No . angular -ui-router wiki says
The permission property is a map object.
This was probably chosen so that the permitted data was easily accessible on the route. It works this way in both ngRoute and u-router.
You can simplify by doing what you have in the function, this is the testService method, then run function(testService), { return testService.doAdminChecks(); }or similar.
source
share