title: How to reload page (angularJs)
body: <p>We have MVC application using AngularJs for front-end. The menu view has the following code</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code> &lt;ul&gt;
                                  @foreach (var child in parent.Children)
                                  {
                                      &lt;li class="@MenuHelper.SetChildClass(child, ViewBag) childNode"&gt;
                                          &lt;a href="@child.NavigateUrl"&gt;@child.Text&lt;/a&gt;
                                      &lt;/li&gt;
                                  }
                              &lt;/ul&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>We also have several single page forms in our application (so they are supposed to show just an index view). They have Cancel button that has the following code:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code> $scope.cancel = function () {
                  // window.console &amp;&amp; console.log("Cancel fired");
                  $scope.form.$setPristine();
                  $scope.showForm = false; // close the form
                  //$state.go('home', {}, { reload: "true" });
              };</code></pre>
  </div>
  </div>
  </p>
  
  <p>So, here is the problem. From the main menu (or from the Favorites menu) I activate that single page form. I press the Cancel button. I then try to activate that menu again (say, from Favorites). And - nothing happens. I am only seeing spinning circle. That form's controller's code is never firing.</p>
  
  <p>I believe the problem is in caching and that re-load never happens. My question is - what do I need to do to make sure that page is re-loading? I checked a few threads, but they are not using the code in the menu view I showed. I also tried the following in the js file of one of such pages:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>app.config(['$stateProvider',function($stateProvider) {
          $stateProvider.state('home', {
              url: '/',
              template: '',
              cache: false
          }).
          state('edit', {
              url: '/edit/:id',
              cache: false
          }).state('new', {
              url: '/new',
              cache: false
          });
      }]);</code></pre>
  </div>
  </div>
  </p>
  
  <p>E.g. I've added cache: false</p>
  
  <p>But it made no effect. I think I need something in the menu file instead but I'm not sure how to fix that line  @child.Text to make sure it re-loads. </p>
  
  <p>EDIT: from comment.</p>
  
  <p>My controller for the page in question has the following code: </p>
  
  <pre><code>app.controller('prefsSlsSearchController', ['$scope', '$rootScope', '$timeout', '$state', 'prefsSlsService', 'resourceFactory', function ($scope, $rootScope, $timeout, $state, prefsSlsService, resourceFactory) { 
  var init = function () { 
    $scope.isEditLoading = true; 
    window.console &amp;&amp; console.log("Init fired"); 
    $scope.disableAction = false; 
    $scope.showForm = false; 
    doSearch(); 
  };
  </code></pre>
  
  <p>That msg never shows scnd time</p>