title: AngularJS ui-router otherwise to state instead of url?
body: <p>I am using <a href="https://angularjs.org/">AngularJS</a> and <a href="https://github.com/angular-ui/ui-router">ui-router</a> and in my <code>app.js</code>. I have the following line:</p>
  
  <pre><code>$urlRouterProvider.otherwise('/');
  </code></pre>
  
  <p>However <strong>I do not want it to send the user to a URL</strong> but <em>instead</em> <strong>to a state</strong>:</p>
  
  <pre><code>.state('404',
          {
              views: {
                  'body': {
                      templateUrl: 'partials/404.html',
                  }
              }
          });
  </code></pre>
  
  <p>Normally I would just do this:</p>
  
  <pre><code>$state.go('404');
  </code></pre>
  
  <p>How can I do this for the otherwise method? </p>
  
  <p><em>Note: that my 404 state does not have a URL, so basically it keeps the URL that the user has entered or visited and just changes the template.</em></p>