My angular page stuck (routing not working) if not used for few minutes (when page is idle for few minutes)
<p>I am using Angular UI Router for my Single page application. It is basically report (Grid + charts). When I route from one page to another it is fine. But if I open page and leave it like that for few minutes and again I try to go to another page by clicking link, it is stuck there. Then I have to refresh the page.</p>

<p>This means if the page is left idle for few minutes then the routing is not happening as it should be.</p>

<pre><code>    (function () {

    var module = angular.module("app", ["ngAnimate", "ui.router", "ui.bootstrap"]);
    module.config(function ($stateProvider, $urlRouterProvider) {

      $urlRouterProvider.otherwise("/error");

      $stateProvider
      .state('home', {
        url: "/",
        templateUrl: "partials/index.html",
        controller: "indexController",
        controllerAs: "ctrl"
      })
      .state('weather', {
        url: "/weather",
        templateUrl: "./partials/weather.html",
        controller: "weatherController",
        controllerAs: "ctrl"
      })
      .state('error', {
        url: "/error",
        templateUrl: "/partials/error.html"
      })
      .state('horizontalBar', {
        url: "/horizontalBar",
        templateUrl: "./partials/charts/d3/horizontalBar.html",
        controller: "horizontalBarController",
        controllerAs: "ctrl"
      })
      .state('lineChart', {
        url: "/lineChart",
        templateUrl: "./partials/charts/d3/lineChart.html",
        controller: "lineChartController",
        controllerAs: "ctrl"
      });

    });  
}());
</code></pre>