After installing the package through the bower, it is not recognized in the project. Here is the code:
install command: bower install angular-permission --save (already tried to install by npm also, but without success)
code where I use the service:
(function() {
'use strict';
angular
.module('project')
.factory('UserSession', UserSession);
function UserSession($q, AuthServer, PermPermissionStore) {
//... outros códigos
function getAccountThen (account) {
authenticate(account.data);
if(account.data === "") {
return getAccountCatch();
}
var perfis = _account.perfil.map(function(p) { return p.cdPerfil });
PermPermissionStore.clearStore();
PermPermissionStore.defineManyPermissions(perfis, hasAuthority);
_account = account.data;
_authenticated = true;
deferred.resolve(_account);
}
//... outros códigos
}
}) ();
The same code is used in other projects and works perfectly.
Error Stack:
Uncaught Error: [$injector:unpr] Unknown provider: PermPermissionStoreProvider <- PermPermissionStore <- UserSession <- AuthService
link $ injector / unpr? p0 = PermPermissionStoreProvider% 20% 3C-% 20PermPermissionStore% 20% 3C-% 20UserSession% 20% 3C-% 20AuthService at angular.js: 68 at angular.js: 4501 at Object.getService [as get] (angular.js: 4654) at angular.js: 4506 at getService (angular.js: 4654) at injectionArgs (angular.js: 4678) at Object.invoke (angular.js: 4700) at Object.enforcedReturnValue [as $ get] (angular.js: 4547) at Object.invoke (angular.js: 4708) at angular.js: 4507
What could be causing the error? I have already run 'gulp clean & gulp build & gulp serves' and nothing. I already closed the text editor and opened, and nothing.
Thanks in advance for any help.