Angular 2 - Как перейти к другому маршруту, используя this.router.parent.navigate ('/ about')?

Angular 2 - Как перейти к другому маршруту, используя this.router.parent.navigate ('/ about').

Это не похоже на работу. Я пробовал location.go ("/ about"); как это не сработало.

в основном, как только пользователь вошел в систему, я хочу перенаправить их на другую страницу.

Вот мой код ниже:

 import {Component} from 'angular2/angular2';
 import {CORE_DIRECTIVES, FORM_DIRECTIVES} from 'angular2/angular2';
 import {Router} from 'angular2/router';

 import {AuthService} from '../../authService';

 //Model
 class User {
   constructor(public email: string, public password: string) {}
 }

 @Component({
   templateUrl:'src/app/components/todo/todo.html',
   directives: [CORE_DIRECTIVES, FORM_DIRECTIVES]
 })

 export class Todo {   
     model = new User('[email protected]', 'Password'); 
     authService:AuthService;
     router: Router;

   constructor(_router: Router, _authService: AuthService){   
       this.authService = _authService;
       this.router = _router;
   }

   onLogin = () => {
       this.authService.logUserIn(this.model).then((success) => {      

          //This is where its broke - below:          
          this.router.parent.navigate('/about');

       });
   }
 }

Заранее спасибо!

Ответы на вопрос(5)

Ваш ответ на вопрос