title: Parameters in Angular2 ui-router
body: <p>I work with angular2 and ui-router (<a href="https://ui-router.github.io/docs/latest/modules/ng2.html" rel="nofollow noreferrer">https://ui-router.github.io/docs/latest/modules/ng2.html</a>).
  I use the stateService in order to move from a state to another in typescript code.
  How can i get passed parameter in the new component?
  Here some code of the caller component:</p>
  
  <pre><code>private editUser(user: User): void {
      this.uiRouter.stateService.go("home.userEdit", { userToEdit: user }, null);
  }
  </code></pre>
  
  <p>And here the code of the called component:</p>
  
  <pre><code>constructor(private uiRouter: UIRouter, private usersService: UsersService) {
      if (uiRouter.globals.params != null) {
          //this.user = user;
      }
  }
  </code></pre>
  
  <p>The problem is that uiRouter.globals.params has always one single property named "#" with null value. What is the problem?</p>