The controller runs twice ONLY on page refresh.

My controllers are fired twice when I refresh the page. However, if I navigate to the page from somewhere else in the app, the controller just fires up once, as expected. The problem only occurs if I refresh the page.

This is a similar problem for these two questions:

However, the problem I am facing is different in that I only declare my controller in the config routeProvider.

$routeProvider.when('/render/pools/', {
    templateUrl: "app/components/render/pools/views/pools.tpl.html",
    controller: "PoolsCtrl"
}); 

      

I tend to believe this is a problem with the routeProvider module and how I configured it. I'm pretty sure my controllers are only declared in the routeProvider config. I do not use ng-controller

at any time.

Any suggestions?

+3


source to share





All Articles