1

I have a single page application with one root html and rest of the functionality divided in multiple pages.
In my root controller I have some functionality where I register for callback from one service for getting few notifications.

But somehow when I load some of the pages my root controller is getting loaded two/three times and because of that my callbacks are not getting called which are registered in service.

So How can I prevent my controller getting loaded multiple times.
I don't have control over routing as I am using Angular Kenod which takes care of routing.

User7723337
  • 11,857
  • 27
  • 101
  • 182
  • 1
    You probably have `ng-controller="rootController"` or something similar in two or three places. This commonly happens when you have routing that instantiates the controller, but then in your view you also have `ng-controller`. – Lex Jul 15 '16 at 03:50
  • Possible duplicate http://stackoverflow.com/questions/15535336/combating-angularjs-executing-controller-twice – Gangadhar Jannu Jul 15 '16 at 03:54

0 Answers0