Adding a dependency to main config method?


#1

I have a hybrid app and I have written a service to keep track of config parameters in localstorage. I want to check my initialization state in the main app config method. However I can not seem to get this to work.

Rather than show you my crappy code, here is an experiment I performed that did not work as I would expect:
Take the ionic starter project (i.e the result of ‘ionic start myproj’)
Run it in your browser to confirm it brings up tabs.
Now go into app.js and change the line:

.config(,function ($stateProvider, $urlRouterProvider) {

to be:

.config(['$stateProvider','$urlRouterProvider', 'Friends',function ($stateProvider, $urlRouterProvider,Friends) {

(you will need to add the closing ‘]’ to avoid a syntax error)

Now reload your myproj app in the browser and … something is wrong because all I see is a back button and no longer a nice set of tabs. I would expect that adding a dependency on Friends would be a benign (even if useless) change.

So any thoughts on what I am missing here?

Thanks


#2

actually, I think this answered my question.