2
I came across a problem I have a Controller called Ordercontroller which is in two modules, Sales and Supply. When I route to the screen that will use this controller how can I define which of the two controllers I want to use, how can I define which module I want the controller from? I tried to register the route separately in each module, but still not the right one.
Complete code: https://plnkr.co/edit/iLUuUNKWZJhg23rrk1zB?p=preview
I think you should rename the controller, or it will use what was declared first.
– celsomtrindade
@Celsomtrindade is correct. Use different names, or declare the controller only once.
– OnoSendai
then angular modules do not serve as a namespace or Packge of a "class"
– Ricardo Carvalho
@Ricardocarvalho no. Reference: http://stackoverflow.com/a/14909537/1845714
– OnoSendai
@I thank you for the reference. I’m sad, but if it’s the way, let’s do it like this :/
– Ricardo Carvalho
@Ricardocarvalho not so. It is certainly a limitation, but not very striking.
– OnoSendai