Skip to content
This repository has been archived by the owner on Sep 20, 2020. It is now read-only.

New Future Module null reference #151

Closed
amcdnl opened this issue Feb 2, 2015 · 5 comments
Closed

New Future Module null reference #151

amcdnl opened this issue Feb 2, 2015 · 5 comments
Assignees
Milestone

Comments

@amcdnl
Copy link

amcdnl commented Feb 2, 2015

Grabbed new build to use future states. After adding I get a internalStates is not defined, tracing internalStates its local variable defined in the core. I DO have core included but because of closure its not getting it.

 Uncaught Error: [$injector:modulerr] Failed to instantiate module myapp due to:
ReferenceError: internalStates is not defined
    at findState (http://windows.local/swimlane-local/bower_components/ui-router-extras/release/modular/ct-ui-router-extras.future.js:77:47)
    at _futureStateProvider.futureState (http://windows.local/swimlane-local/bower_components/ui-router-extras/release/modular/ct-ui-router-extras.future.js:52:22)
    at http://windows.local/swimlane-local/dist/common/utils/routing.js:35:28
    at Array.forEach (native)
    at exports.routing.RouterConfig (http://windows.local/swimlane-local/dist/common/utils/routing.js:34:18)
    at Object.invoke (http://windows.local/swimlane-local/bower_components/angular/angular.js:4182:17)
    at runInvokeQueue (http://windows.local/swimlane-local/bower_components/angular/angular.js:4088:35)
    at http://windows.local/swimlane-local/bower_components/angular/angular.js:4097:11
    at forEach (http://windows.local/swimlane-local/bower_components/angular/angular.js:323:20)
    at loadModules (http://windows.local/swimlane-local/bower_components/angular/angular.js:4078:5)
http://errors.angularjs.org/1.3.11/$injector/modulerr?p0=swimlane&p1=Refere…ocal%2Fswimlane-local%2Fbower_components%2Fangular%2Fangular.js%3A4078%3A5)
@amcdnl
Copy link
Author

amcdnl commented Feb 2, 2015

Fixed. Note: It would be nice to turn off debug messages for things that 'work' right by default. Example:
$log.debug("event, unfoundState, fromState, fromParams", event, unfoundState, fromState, fromParams);

@christopherthielen
Copy link
Owner

Incidentally, you can turn off $log's debugging level:
$logProvider.debugEnabled([flag]);

https://docs.angularjs.org/api/ng/provider/$logProvider

@amcdnl
Copy link
Author

amcdnl commented Feb 3, 2015

Ya, I knew you could do that globally but I wanted it for this specific module only.

@amcdnl
Copy link
Author

amcdnl commented Feb 3, 2015

@christopherthielen I've noticed if the ui-router can't resolve the future state when using the ui-sref directive it doesn't add the href hash to it causing it not to have a pointer ....

@christopherthielen
Copy link
Owner

@amcdnl yeah i know :( #59

impatient pushed a commit to impatient/ui-router-extras that referenced this issue Feb 5, 2015
- missing reference to internalStates in core module, hidden by closure

fixes christopherthielen#151
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants