title: Difference between ui-sref and $state.go in AngularJS UI-Router
body: <p>Is there any functional difference between <code>ui-sref</code> and <code>$state.go()</code>?</p>
  
  <p><code>ui-sref</code> is used in <code>&lt;a&gt;...&lt;/a&gt;</code> and <code>$state.go('someState')</code> is used in a controller.</p>
  
  <p>In HTML, I would use:</p>
  
  <pre><code>&lt;a ui-sref="currentState.state1"&gt;Link&lt;/a&gt;
  </code></pre>
  
  <p>whereas in a function I would use something like:</p>
  
  <pre><code>if(someCondition) {
      $state.go('currentState.state1');
  }
  </code></pre>
  
  <p>So, is that it or do I need to add something after <code>$state.go()</code>? Assuming current state is <code>currentState</code>.</p>