Error: state.$$permissionState is not a function
See original GitHub issueHi, I face this issue when just inject to angular module. I’ve search but no found anywhere 😦. I include js like that:
<script src="bower_components/angular-ui-router/release/angular-ui-router.js"></script>
<script src="bower_components/angular-permission/dist/angular-permission.js"></script>
<script src="bower_components/angular-permission/dist/angular-permission-ui.js"></script>
Full error log:
Error: state.$$permissionState is not a function
StatePermissionMap@http://localhost:8080/bower_components/angular-permission/dist/angular-permission-ui.js:455:27
run/<@http://localhost:8080/bower_components/angular-permission/dist/angular-permission-ui.js:70:36
$RootScopeProvider/this.$get</Scope.prototype.$broadcast@http://localhost:8080/bower_components/angular/angular.js:18005:15
transitionTo@http://localhost:8080/bower_components/angular-ui-router/release/angular-ui-router.js:3273:13
registerState/<@http://localhost:8080/bower_components/angular-ui-router/release/angular-ui-router.js:2384:11
invoke@http://localhost:8080/bower_components/angular/angular.js:4718:16
handleIfMatch@http://localhost:8080/bower_components/angular-ui-router/release/angular-ui-router.js:1868:18
$UrlRouterProvider/this.when/strategies.matcher/<@http://localhost:8080/bower_components/angular-ui-router/release/angular-ui-router.js:1925:18
check@http://localhost:8080/bower_components/angular-ui-router/release/angular-ui-router.js:2041:23
update@http://localhost:8080/bower_components/angular-ui-router/release/angular-ui-router.js:2050:13
$RootScopeProvider/this.$get</Scope.prototype.$broadcast@http://localhost:8080/bower_components/angular/angular.js:18005:15
afterLocationChange@http://localhost:8080/bower_components/angular/angular.js:13764:7
$locationWatch/<@http://localhost:8080/bower_components/angular/angular.js:13750:13
$RootScopeProvider/this.$get</Scope.prototype.$eval@http://localhost:8080/bower_components/angular/angular.js:17682:16
$RootScopeProvider/this.$get</Scope.prototype.$digest@http://localhost:8080/bower_components/angular/angular.js:17495:15
$RootScopeProvider/this.$get</Scope.prototype.$apply@http://localhost:8080/bower_components/angular/angular.js:17790:13
bootstrapApply@http://localhost:8080/bower_components/angular/angular.js:1761:9
invoke@http://localhost:8080/bower_components/angular/angular.js:4718:16
bootstrap/doBootstrap@http://localhost:8080/bower_components/angular/angular.js:1759:5
bootstrap@http://localhost:8080/bower_components/angular/angular.js:1779:12
angularInit@http://localhost:8080/bower_components/angular/angular.js:1664:5
@http://localhost:8080/bower_components/angular/angular.js:31763:5
trigger@http://localhost:8080/bower_components/angular/angular.js:3207:7
defaultHandlerWrapper@http://localhost:8080/bower_components/angular/angular.js:3497:3
createEventHandler/eventHandler@http://localhost:8080/bower_components/angular/angular.js:3485:9
EventListener.handleEvent*addEventListenerFn@http://localhost:8080/bower_components/angular/angular.js:2796:7
jqLiteOn/addHandler@http://localhost:8080/bower_components/angular/angular.js:3547:11
jqLiteOn@http://localhost:8080/bower_components/angular/angular.js:3560:9
JQLite.prototype[name]@http://localhost:8080/bower_components/angular/angular.js:3728:17
JQLite.prototype.ready@http://localhost:8080/bower_components/angular/angular.js:3214:7
@http://localhost:8080/bower_components/angular/angular.js:31762:3
@http://localhost:8080/bower_components/angular/angular.js:6:2
I use angular 1.5.8.
Issue Analytics
- State:
- Created 7 years ago
- Comments:18
Top Results From Across the Web
state.$$permissionState is not a function · Issue #352
I get this error using the unminified version of angular-permission but only in one particular state in my app.
Read more >PermissionStatus.state - Web APIs - MDN Web Docs
The state read-only property of the PermissionStatus interface returns the state of a requested permission. This property returns one of ...
Read more >Unable to check DeviceMotionEvent permission state
"requestPermission" checks if the permission is set and returns the status. ONLY if not set does it activate the native request mechanism. –...
Read more >CodeAccessPermission Class (System.Security)
If a permission object is null , it is handled the same as a permission object with the state PermissionState.None. The call stack...
Read more >Permissions
permission state constraints : Constraints on the values that the user agent can return as a descriptor's permission state. Defaults to no ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I had the same problem and i found a solution. @spyhunter88 seeing your declaration order, you must declare permission and permission-ui after ui.route but not before your module (where you declare states)
Try this order
Maybe the same applies to other facing the same issue 😃
PS: My scenario
I have followed the above instruction and #365 issue, but state.$$permissionState is not a function still happen 😦