title: angular-ui-router: add css class if state matched
body: <p>simple wiki</p>
  
  <p>I'd like to show an edit button in the navbar is state == 'page'</p>
  
  <p>v0.2.10</p>
  
  <pre><code>.state('page',{
      url: "/wiki/{ns:[0-9a-zA-Z\-/_]+}/{wp:[0-9a-zA-Z\-/_]+}",
      templateUrl: "views/wiki/view.html",
      controller: "PageController"
  })
  </code></pre>
  
  <p>I tried</p>
  
  <pre><code>&lt;li ng-show="$state.$current.name == 'page'"&gt;&lt;button type="button" class="btn btn-default navbar-btn"&gt;Edit&lt;/button&gt;&lt;/li&gt;
  </code></pre>
  
  <p>and</p>
  
  <pre><code>&lt;a ng-class="{hidden: $state.$current.name == 'page'}" class="btn navbar-btn btn-primary" ui-sref="edit"&gt;Edit&lt;/a&gt;
  </code></pre>
  
  <p>even</p>
  
  <pre><code>$state.includes('page')
  </code></pre>
  
  <p>and</p>
  
  <pre><code>$state.is('page')
  </code></pre>