You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had tried angular-permission in one of my previous projects with version 2.3.8 I believe and It was working fine.
Now, while setting up a new project with the updated newest version we are getting - 79 Uncaught TypeError: PermPermissionStore.definePermission is not a function
for the setup
I used the unminified files from "bower install angular-permission" (angular-permission.js, angular-permission-ui.js)
defined 'permission', 'permission.ui' in app modules.
Now in the app run block when I am trying to setup dynamic permissions from server like this -
PermPermissionStore.definePermission('anonymous', function ($stateParams) {
var deferred = $q.defer();
Auth.isLoggedInAsync(function(cb){
if (cb && cb == true) deferred.reject();
else deferred.resolve();
});
return deferred.promise;
});
Where Auth service handles the logic for authenticating / retrieving role info from server.
Now, I am getting that definePermissions is not a function.
[Note: I am not including the dependencies (permissions.js / permissions-ui.js) as is in the body / head section of my index.html. But, passing these to my gulp pipeline for minification and concatenation into one single deps file for production, but I read in the issues section somewhere that minified versions might create / have some issues. So, to check this issue I did try to include them in the main index.html after my angular script definition, but got the same error again. ]
What might be the issue here, can anyone help me debug this issue.
The text was updated successfully, but these errors were encountered:
Hi,
I had tried angular-permission in one of my previous projects with version 2.3.8 I believe and It was working fine.
Now, while setting up a new project with the updated newest version we are getting -
79 Uncaught TypeError: PermPermissionStore.definePermission is not a function
for the setup
Now in the app run block when I am trying to setup dynamic permissions from server like this -
Where Auth service handles the logic for authenticating / retrieving role info from server.
Now, I am getting that definePermissions is not a function.
[Note: I am not including the dependencies (permissions.js / permissions-ui.js) as is in the body / head section of my index.html. But, passing these to my gulp pipeline for minification and concatenation into one single deps file for production, but I read in the issues section somewhere that minified versions might create / have some issues. So, to check this issue I did try to include them in the main index.html after my angular script definition, but got the same error again. ]
What might be the issue here, can anyone help me debug this issue.
The text was updated successfully, but these errors were encountered: