title: How can redirect to 404 page in Angular ui router
body: <p>Hi I am getting problem while implementing 404 page using angular ui router'
  Scenario
  when the user type something in the url which was not present in the app i have to show 404 page not found page</p>
  
  <p>What I tried</p>
  
  <p>app.js</p>
  
  <pre><code>var myapp = angular.module('myapp', ['ui.router']);
  
  myapp.config(function($stateProvider, $urlRouterProvider) {
  
      $urlRouterProvider.otherwise('/xxx/xxxoverview');
  
      $stateProvider.state('xxx', {
          url:'/xxx',
          templateUrl :'partials/xxx/xxxOverview.html',
          controller:'xxxAccordionCtrl'
      })
       .state('404', {
          url:'/404',
          templateUrl :'404.html'
  
      });
  </code></pre>
  
  <p>My Actual Design </p>
  
  <p><a href="https://i.stack.imgur.com/ZfOgv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ZfOgv.png" alt="enter image description here"></a></p>
  
  <p>I am getting the following response
  <a href="https://i.stack.imgur.com/L7TN9.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/L7TN9.png" alt="enter image description here"></a></p>
  
  <p>I am expecting</p>
  
  <p><a href="https://i.stack.imgur.com/nWcVI.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nWcVI.png" alt="enter image description here"></a></p>