So this issue has greatly frustrated me on this project. I'll add new
routes, and sometimes they work, sometimes they don't. No error is thrown
when one does not work. After much trial and error, I found that the type
(template vs templateURL) and order of the object properties was causing
this... tried many different version of angular just incase it was a
version issue
for instance:
FAILS:
.when('/profile', { templateUrl: 'partials/account/secure/profile.html',
controller: 'ProfileCtrl', controllerAs: 'profile', resolve:
resolveProvider.profile('patient') })
WORKS:
.when('/profile', { controller: 'ProfileCtrl', controllerAs: 'profile',
templateUrl: 'partials/account/secure/profile.html', resolve:
resolveProvider.profile('patient') })
.when('/profile', { template: '<p>Hello</p>', controller: 'ProfileCtrl',
controllerAs: 'profile', resolve: resolveProvider.profile('patient') })
The only difference between the first (doesn't work) and the second (works)
is that I moved templateURL after controllerAs, which shouldn't matter.
What is also frustrating, is that I am using this order on all my routes,
most work, just occasionally I'll add one, and it doesn't, which is how I
finally figured this out.
More curiosity at this point, any ideas why this is happening??
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.