Angular controller being run twice [solved]

Ok figured it out with some guidance from Stewie in the comments.

My app has routing, and it was navigating to MyController like so:

But I also had this in home.html:

Which was instructing AngularJS to digest my controller twice. To solve it I simply removed the data-ng-controller from my HTML.

Obviously really when I think about it!


Sam is a passionate web developer from England. In his spare time he enjoys coding, playing chess, reading and investing.

Leave a Reply

Your email address will not be published. Required fields are marked *