Yes, you are correct.  When you add the controller property to your 
route/state definition, you can't re-specify the use of your controller via 
something like <div ng-controller="MyController"> in your partial/template. 
 The two will conflict with each other and hence cause your resolve 
property to not be injected properly.   

On Sunday, 2 March 2014 08:34:40 UTC+8, LLoydsensei wrote:
>
> Hello.
>
> I'm new to ui-router and still in the process of converting my app.
> I switched to ui-router because of the resolve capabilities explained 
> here: https://github.com/angular-ui/ui-router/wiki#wiki-resolve
> I know $route also has this, but I'm having a hard time getting to a good 
> $route documentation, so I coulnd't get it to work with $route.
>
> I tried to have a resolve property injected into my controller, but it 
> seems I cannot set the controller in the template in that case... Am I 
> right?
> Here is a plunkr forked from the ui-router documentation, I've created a 
> route for each controller invocation I could think of.
>
> http://plnkr.co/edit/WlFT4OQPUa2kieR3F7HJ?p=preview
>
> Thank you for your help.
> LLoyd
>

-- 
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/groups/opt_out.

Reply via email to