title: Modal loading spinner not showing up a second time
body: <p>I'm currently working on a project in angular. I'm trying to show a loading spinner every time the page changes. To accomplish this we are using <strong>ngRoute</strong> module and listening for <strong>routeChangeStart</strong>,<strong>routeChangeSuccess</strong>,<strong>routeChangeError</strong> events. </p>
  
  <p>Here's the code:</p>
  
  <pre><code>$scope.$on('$routeChangeStart', function (event, param) {
      var html = "&lt;div class='panel-body'&gt;"
                  + "&lt;div class='col-md-4 col-md-offset-4' style='top: 50%;'&gt;"
                    + "&lt;i class='fa fa-spinner fa-spin'&gt;&lt;/i&gt; Caricamento in corso..."
                 + "&lt;/div&gt;"
              + "&lt;/div&gt;";
  
      that.myModal = $modal.open({
      template: html,
      backdrop: 'static'
      });
  });
  
  $scope.$on('$routeChangeSuccess', function (event, param) {
      that.myModal.dismiss('nessuna');
  });
  
  $scope.$on('$routeChangeError', function (event, param) {
      that.myModal.dismiss('nessuna');
  });
  </code></pre>
  
  <p>This works, but only the first time a certain page is changed. I try to explain better: When we are in page <strong>X</strong> and navigate to page <strong>Y</strong> the modal is shown and then hidden after page changes. If then i go back to page <strong>X</strong> and navigate to page <strong>Y</strong> again the modal spinner is now shown. </p>
  
  <p>When debugging I can see the <strong>modal.open()</strong> executing, but it's never shown. It looks like angular is somehow delaying the command.</p>
  
  <p>Does anyone know why is this happening? Has anyone encountered this problem before?</p>