title: How to add search parameter to the URL using AngularJS UI Router .go()?
body: <p>Is there a way to add a search parameter to the URL when using UI-Router's <code>$state.go()</code>? I would like to use a defined state with additional info in the URL instead of defining a new route with the same configuration.</p>
  
  <p>I have a simple view defined:</p>
  
  <pre><code>.when('page-with-form', {
      template: 'views/page-with-form.html',
      url: '/page-with-form'
  })
  </code></pre>
  
  <p>I want the route to work as normal when someone navigates to <code>/page-with-form</code> but when I have something else in the application that would redirect the user to that route with some additional information <code>/page-with-form?error=true</code> something like this perhaps:</p>
  
  <pre><code>$state.go('page-with-form', '?error=true');
  </code></pre>