title: Catch angular wildcard route if it doesn't exist
body: <p>In my angular project, i'm resolving most of the routes from a wildcard</p>
  
  <pre><code>function getTemplateUrl (route) {
    return '/views/' + route.page + '.html';
  }
  .when('/:page', { templateUrl : getTemplateUrl })
  .when('/:page/:edit', { templateUrl : getTemplateUrl })
  .otherwise({redirectTo: '/dashboard'});
  </code></pre>
  
  <p>the only issue, is that when the route doesn't exist, it will still try to load the page, not the <code>otherwise</code> function and loads the page over and over again, thus creating an infinite loop. </p>
  
  <p>Is there any way I can check if the route exists?</p>