[Solved] View is getting initialized again and again
You need to familiarize yourself with the concept of a digest loop in Angular. In short, every time a digest loop runs, all expressions, e.g. {{name}} or ng-show=”isActive && isEnabled”, that are being “$watched” by Angular are evaluated (sometimes more than once). This means that if you are invoking a function inside an expression: <div … Read more