angular 路由

* // Navigate to /results?page=1
* this.router.navigate(['/results'], { queryParams: { page: 1 } });
 
* // Navigate to /results#top
* this.router.navigate(['/results'], { fragment: 'top' });

 

this.navController.navigateBack(path)
等同:
* this.navController.setDirection('back');
* this.router.navigateByUrl(path);
等同:
* <a routerLink="/path/to/page" routerDirection="back">Link</a>
 
 
* this.navController.setDirection('root');
* this.router.navigateByUrl(path);
等同:
<a routerLink="/path/to/page" routerDirection="root">Link</a>
等同:
this.navController.navigateRoot()
 
 
 
 
 

posted @ 2020-10-23 16:19  johnjackson  阅读(130)  评论(0编辑  收藏  举报