title: this.router is undefined in AngularJS 2
body: <p>Here is my method that registers a user and redirects to the main page:</p>
  
  <pre><code>onSubmit(){
      this.userService.createUser(this.user).subscribe(function (response) {
              alert('Successfully registered');
              localStorage.setItem('token', response['token']);
              this.router.navigate(['Home']);
          }, function (err) {
              console.log(err);
          }
      );
  }
  </code></pre>
  
  <p>above it, I have this constructor:</p>
  
  <pre><code>constructor(private router: Router, private userService: UserService){}
  </code></pre>
  
  <p>I added <code>ROUTER_PROVIDERS</code> to the main component:</p>
  
  <pre><code>providers: [
      ROUTER_PROVIDERS,
      HTTP_PROVIDERS
  ]
  </code></pre>
  
  <p>When I try to register a user, I get this error:</p>
  
  <pre><code>TypeError: Cannot read property 'navigate' of undefined
  </code></pre>
  
  <p>What am I doing wrong?</p>