javascript - Angular Runnning Controller twice on browser reload -
problem:
i have angular app works fine. has 4 main page controllers loaded inside ng-view. there controllers connected pages routed via ngroute.
when app loaded first time works ok. if go of these pages , press browser's refresh(f5) controllers called twice. there reason why run once in first instance , twice in reload?
regards, ish
common problem, must have loaded controller on ui-router , in html file. remove html file, use router inject controllers, practice.