title: AngularJS show dialog from routeProvider
body: <p>Is it possible to [execute a function] e.g. open a modal dialog window from the routeProvider when a certain route is requested?</p>
  
  <pre><code>myApp.config(function($routeProvider) {
      $routeProvider
          .when('/home',
              {
                  controller: 'HomeCtrl',
                  templateUrl: 'Home/HomeView.html'
              }
          ).when('/profile/:userId/changepwd',
              function(){                
                  $dialog.messageBox(title, msg, btns)
                      .open()
                      .then(function(result){
                      alert('dialog closed with result: ' + result);
                  });
              }
          ).otherwise({ redirectTo: '/home' });
  });
  </code></pre>
  
  <p><strong>PS:</strong> I want to cancel a route and instead open a dialog box. Opening the dialog box is not the only issue. Cancelling the route is the major issue.</p>