title: AngularJS full page refresh on the page I am visting, not the current one
body: <p>I am using maphilight on my main page but if i route to a different partial and then return to that main page, maphilight stops working. However, if I then refresh the page, it works again. how do i force that main page to refresh every time I navigate back to it? I have seen people able to refresh the current page with</p>
  
  <pre><code>$scope.reloadPage = function(){window.location.reload();}
  </code></pre>
  
  <p>and</p>
  
  <pre><code>&lt;a ng-click="reloadPage()" href="index.html#/diagram"&gt;Back to search&lt;/a&gt;
  </code></pre>
  
  <p>but I cant get this to refresh the page I am navigating to. thanks in advance</p>
  
  <p>here is the controller for the page I am <strong>linking to</strong> and want to refresh:</p>
  
  <pre><code>roomControllers.controller('DiagramController', ['$scope', '$route',  '$http', function($scope, $route, $http) {
  $http.get('js/master.json').success(function(data) {
     $scope.rooms = data;
     $scope.reloadPage = function(){window.location.reload();}
  });
  }]);
  </code></pre>
  
  <p>here is link in the page that I am <strong>coming from</strong></p>
  
  <pre><code>&lt;a ng-click="reloadPage()" href="index.html#/diagram"&gt;&amp;laquo; Back to search&lt;/a&gt;
  </code></pre>
  
  <p>and here is the app code</p>
  
  <pre><code>var myApp = angular.module('myApp', [
   'ngRoute',
   'roomControllers'
  ]);
  
  myApp.config(['$routeProvider', function($routeProvider) {
    $routeProvider.
    when('/diagram', {
      templateUrl: 'partials/diagram.html',
      controller: 'DiagramController'
    }).
    when('/diagram/:roomId', {
      templateUrl: 'partials/room-details.html',
      controller: 'RoomDetailsController'
    }).
    otherwise({
      redirectTo: '/diagram'
    });
  }]);
  
  myApp.directive('highlight', function() {
      return {
          restrict: 'A',
          link: $(function(scope, element, attrs) {
            $('img[usemap]').maphilight();
       })};
  </code></pre>
  
  <p>}); </p>
  
  <p>and finally the html for the imagemap being highlighted:</p>
  
  <pre><code>&lt;div class="info"&gt;
    &lt;img ng-src="images/housediagram.jpg" alt="Photo of thing" class="map" usemap="#houseMap" highlight&gt;
  
    &lt;map name="houseMap" id="map"&gt;
      &lt;area ng-repeat="room in rooms" name="{{room.name}}" id="{{room.id}}" shape="poly" coords="{{room.coords}}" href="#/diagram/{{room.id}}" /&gt;
    &lt;/map&gt;
  &lt;/div&gt;
  </code></pre>