title: How to make last slash optional in angular ui router?
body: <p>I have two states like this:</p>
  
  <pre><code>    $stateProvider.state('app', {
          url: '/app',
          template: '&lt;app-index&gt;&lt;/app-index&gt;',
          data: {},
          resolve: {}
      });
      $stateProvider.state('app.list', {
          url: '/list/:type?',
          template: '&lt;app-list&gt;&lt;/app-list&gt;',
          data: {},
          resolve: {}
      })
  </code></pre>
  
  <p>it work fine but when I type url /app/list it redirect to home page, how can I make slash optional? I've tried to put this url '/list/?:type?' but that didn't work. Should I add redirect, if yes then how?</p>