Using iron router with angular meta makes controllers load twice
I have a Meteor app using angular-meteor. Now I need to load various angular modules depending on url. I added a hardware router to my application to do this and I keep on processing routes for each module using ngRoute and anchor nav, but it behaves strangely if the url contains parameters. I made a small test case which is available here:
https://github.com/clouchtibat/iron-router-ng-route
If you click on the "truc" link and then on "test", the following route changes will cause the controller to instantiate twice. It works if urls have no parameters.
I have also tested with ui-router (on the c-ui-router branch) and the problem is the same, but in addition to that there is duplication.
Is this a bug in one of the two routers or is there something wrong with my implementation?
source to share
Take a look at these conversations on the angular-meteor Github issues:
https://github.com/Urigo/angular-meteor/issues/154
https://github.com/Urigo/ angular -meteor / issues / 493
I think this might help you in some ways. I also have a difficult time with the angular mixin and hardware: the router.
source to share