Well, I have not found it in any other post, if there is srry :) finally
I have the following config
myApp.config(function($routeProvider) {
$routeProvider
// route for the index page
.when('/index', {
templateUrl : 'pages/index.html',
controller : 'mainController'
})
// route for the home page
.when('/home', {
templateUrl : 'pages/home.html',
controller : 'aboutController'
})
});
I just wanted to work with different views, for different users, on the same route.
For example, I have two users, user X is adm and user Y is a regular user, so when they both access the '/ index' route they will have the same view.
But when they accessed the route '/ home' wanted a different template to be shown for each one. How can I do this?
I accept all kinds of help. VALEEU!