FYI, order doesn't always seem to matter, when I take a duplicate entry I 
added during various trial-and-error attempts, where the only difference is 
the path is /account instead of /profile, the order of properties doesn't 
seem to matter, it fails to load no matter what. So what happens is that it 
makes it through route change start and success, though on success the 
scope looks like that of the parent, not the route controller, and the 
template url is never called for.

On Saturday, October 4, 2014 10:10:02 PM UTC-4, Adam Marr wrote:
>
> 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.

Reply via email to