For some reason, my controller is double called, when I switch between resource 1 and resource2.
Here\'s the code:
index.html
Found an exact same question:
AngularJs: controller is called twice by using $routeProvider
The solution is to add "/" at the end of router url:
- when('/res/:id', + when('/res/:id/',