AngularJs, change menu item whether user is connected or not
问题 I am new to AngularJS and I try to deal with user authentication. I ensure non connected user can't access restricted route : app.js .config(function ($routeProvider) { $routeProvider .when('/myroute', { templateUrl: 'views/myroute.html', controller: 'MyrouteCtrl', access: { isFreeAccess: false } }) ... .run( function ($rootScope, $location, Auth) { $rootScope.$on('$routeChangeStart', function(currRoute, prevRoute){ if (prevRoute.access != undefined) { // if route requires auth and user is