1
.state('Wizard', {
 url: '/Wizard/:Email',
 templateUrl: '/Common/_Wizard',
 controller: 'Common_Wizard',

}

We are seeing email address in our url like

localhost:15646/Home/Index#/Wizard/[email protected]/Loan/Loan

[email protected] this is an email address.and this email address is used in different controller and views. how we can hide this and access on other controller and views. we dont want to use any local storage or service.

Thanks in Advance

1 Answer 1

1

You could create service factory class:

angular.module('YourApp').factory('UserContext', function() {
   this.getUserEmail = function() {...}
});

to encapsulate user (email,...) data and inject it in every controller:

angular.module('YourApp').controller('FooBar', function($scope, UserContext) { 
   $scope.email = UserContext.getUserEmail();
});

You could also just put the data into the $rootScope, but this is for sure not the best idea.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.