however, when I apply the exact same approach to my g-a-f-i project then it doesn't work!
when trying to access the state (and thus activate the controller) the following error in console:
Error: [$injector:unpr] Unknown provider: plzworkProvider <- plzwork <- ionichan.chanMobileUI.me
http://errors.angularjs.org/1.3.15/$injector/unpr?p0=plzworkProvider%20%3C-%20plzwork%20%3C-NaNonichan.chanMobileUI.me
at REGEX_STRING_REGEXP (http://localhost:5000/scripts/bundle.js:11084:12)
at http://localhost:5000/scripts/bundle.js:15036:19
at Object.getService [as get] (http://localhost:5000/scripts/bundle.js:15183:39)
at http://localhost:5000/scripts/bundle.js:15041:45
at getService (http://localhost:5000/scripts/bundle.js:15183:39)
at invoke (http://localhost:5000/scripts/bundle.js:15215:13)
at Object.instantiate (http://localhost:5000/scripts/bundle.js:15232:27)
at http://localhost:5000/scripts/bundle.js:19522:28
at IonicModule.controller.self.appendViewElement (http://localhost:5000/scripts/bundle.js:43602:24)
at Object.IonicModule.factory.ionicViewSwitcher.create.switcher.render (http://localhost:5000/scripts/bundle.js:41859:41)
at Object.IonicModule.factory.ionicViewSwitcher.create.switcher.init (http://localhost:5000/scripts/bundle.js:41779:20)
at IonicModule.controller.self.render (http://localhost:5000/scripts/bundle.js:43476:14)
at IonicModule.controller.self.register (http://localhost:5000/scripts/bundle.js:43434:10)
at updateView (http://localhost:5000/scripts/bundle.js:48711:23)
at IonicModule.directive.compile (http://localhost:5000/scripts/bundle.js:48695:9)
at invokeLinkFn (http://localhost:5000/scripts/bundle.js:19279:9)
and the view won't load.
Sample Source Code from generator-angular-famous-ionic project
Note: please check the plnkr for a working version
Note 2: the state that doesn't work is root.Tabs.People.Me
Views
it may be easier to grok the following code if you understand the basic view hierarchy. The following is not actual code, it's just a representation of the views in HTML.
tl;dr
setting a
resolve
property on aui-router
state declaration object doesn't work, but it works in vanilla ionic framework and with vanilla ui routerThe Problem
me
'meController
'and the view won't load.
Sample Source Code from generator-angular-famous-ionic project
Note: please check the plnkr for a working version
Note 2: the state that doesn't work is
root.Tabs.People.Me
Views
it may be easier to grok the following code if you understand the basic view hierarchy. The following is not actual code, it's just a representation of the views in HTML.
root.states.js
tabs.states.js
people.states.js
me.controller.js
Possible Workarounds?
.state()
call tocontroller
? I will reply if this is a working workaroundI would be happy to give access to my project to anyone that is willing to help