title: Can't resolve all parameters for StateService
body: <p>I'm trying to develop the app using <strong>Angular 2 with Ionic 2</strong> and instead of <strong>NavController</strong> I want to try routing with <strong>ui-router-ng2</strong>.</p>
  
  <p><strong>Login.ts:</strong> <br></p>
  
  <pre><code>import { Component } from '@angular/core';
  import { NavController, MenuController } from 'ionic-angular';
  
  import { AlertController } from 'ionic-angular';
  
  import { StateService } from "ui-router-ng2";
  
  import { DashboardPage } from '../dashboard/dashboard';
  
  @Component({
    selector: 'page-login',
    templateUrl: 'login.html',
    providers: [StateService] 
  })
  
  export class LoginPage {
  
    username: string;
    password: string;
  
    constructor(public navCtrl: NavController, public menu: MenuController, public alertCtrl: AlertController, public state: StateService) {
  
      this.menu.enable(false, 'sidenav')
  
    }
  
    login() {
  
      if (this.username == "admin" &amp;&amp; this.password == "admin") {
        // this.navCtrl.setRoot(DashboardPage, { username: this.username });
        this.state.go(DashboardPage);
      } else {
        let alert = this.alertCtrl.create({
          title: 'Incorrect Credentials!',
          subTitle: 'Your username and password are incorrect. Hint: admin',
          buttons: ['Login Again']
        });
        alert.present();
      }
  
    }
  
  }
  </code></pre>
  
  <p><br></p>
  
  <p>I have imported <strong>StateService</strong> from "ui-router-ng2". <a href="https://i.stack.imgur.com/a13b2.png" rel="nofollow noreferrer">I got the error, Can't resolve all parameters for StateService:</a></p>
  
  <p>Please help me in sorting this issue.</p>