Hello Miguel, how are you? I advise you to rename your controller, and make your code is a literature where the name will tell exactly what the controller will do. Thus, anyone who is reading the code will know exactly what it will do.
But .. If you really choose to have two identical names (even if in different modules), you can give a name to each. Try as follows: <div ng-app="worker"> <form ng-controller="InviteController as WorkerInviteController"></form> </div> <div ng-app="organisation"> <form ng-controller="InviteController as OrganisationInviteController"> </form> </div> Hope this helps! 2015-03-15 17:46 GMT-03:00 Witold Szczerba <[email protected]>: > As far as I know it's not possible. You just have to provide unique names. > You can use dots to introduce your own spaces though. > > Regards, > Witold Szczerba > 15 mar 2015 17:52 "Miguel Guedes" <[email protected]> napisał(a): > > New to Angular. If I have two controllers by the same name, say >> `InviteController´, in modules `app.worker´ and `app.organisation´, how do >> I refer to *one* of the controllers from a view? >> >> For instance, >> >> <form ng-controller="InviteController"> <!-- specify which >> `InviteController´ to use --> >> . >> : >> . >> </form> >> >> >> -- >> 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. >> > -- > 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. > -- 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.
