title: Navigate to a route programatically in ui-router-ng2
body: <p>I'm using ui-router-ng2 in an Angular 2 app. How do I tell the router, from JavaScript/Typescript, to navigate to a state? I'm looking for something like:</p>
  
  <pre><code>export class SomeClass {
      constructor(private router: UIRouter) { }
      somefunc() {
          if (some condition) {
              this.router.navigate("/whatever")
          } else {
              this.router.navigate("/home")
      }
  }
  </code></pre>