本文整理汇总了TypeScript中@angular/router.Router.navigate方法的典型用法代码示例。如果您正苦于以下问题:TypeScript Router.navigate方法的具体用法?TypeScript Router.navigate怎么用?TypeScript Router.navigate使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类@angular/router.Router
的用法示例。
在下文中一共展示了Router.navigate方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: startDeposit
startDeposit(): void {
this.router.navigate(['/account/' + this.account._id + '/deposit']);
}
示例2: goToDropDown
public goToDropDown() {
this._router.navigate(["/dd"]);
}
示例3: _postSignIn
private _postSignIn(): void {
this._router.navigate(['']);
}
示例4:
}, () => {
this.router.navigate(['social-register'], {queryParams: {'success': 'false'}});
});
示例5: navigateTo
navigateTo(routerKey: string) {
this.router.navigate([routerKey]);
}
示例6: ngOnInit
ngOnInit() {
this.auth.logout();
this.router.navigate(['/']);
}
示例7: gotoHeroes
gotoHeroes() {
let heroId = this.hero ? this.hero.id : null;
// Pass along the hero id if available
// so that the HeroList component can select that hero.
this.router.navigate(['/heroes'], { queryParams: { id: heroId, foo: 'foo' } });
}
示例8: onClick
onClick () {
this.router.navigate(['/component-two', 456]);
}
示例9: goAcademyHome
goAcademyHome()
{
console.log("### Going to Academy Home...");
this.router.navigate(['/academyHome', {}]);
}
示例10: onCancel
onCancel() {
this.router.navigate(['../', 'view'], { relativeTo: this.route });
}