Hello,
Given the following code (angular 1.x working on migrating this) in a
admin.route.js file I am trying to make it so that user does not see an
Admin page if they do not have that role
This hasRole method/function, is that being fed to this route from the
controller Admin? I do have a ACL service but not sure how to sew this all
together. Can you please help?
Thank you!
{
state: 'admin.list',
resolve: {
access: ["Access", function (Access) { return Access.hasRole("ROLE_ADMIN");
}],
},
config: {
url: '/list',
templateUrl: 'app/admin/admin.html',
controller: 'Admin',
controllerAs: 'vm',
title: 'VM Admin',
settings: {
nav: 5,
content: '<i class="fa fa-gears"></i> VM Admin'
}
}
}
--
You received this message because you are subscribed to the Google Groups
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.