本文整理汇总了TypeScript中angular2/router.Router.isRouteActive方法的典型用法代码示例。如果您正苦于以下问题:TypeScript Router.isRouteActive方法的具体用法?TypeScript Router.isRouteActive怎么用?TypeScript Router.isRouteActive使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类angular2/router.Router
的用法示例。
在下文中一共展示了Router.isRouteActive方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: updateIsSearchPage
updateIsSearchPage(current: Instruction) {
this.isSearchPage = this._router.isRouteActive(current);
}
示例2: isActive
isActive(instruction: any[]) : boolean {
return this._router.isRouteActive(this._router.generate(instruction))
}
示例3: isRouteActive
isRouteActive(linkParams: any[]) {
return this.router.isRouteActive(this.router.generate(linkParams));
}
示例4: isCurrentRoute
isCurrentRoute(route){
var instruction = this._router.generate(route);
return this._router.isRouteActive(instruction);
}
示例5:
this.tabs.toArray().forEach((tab) => {
let instruction = this._router.generate(tab.tabLink);
if(this._router.isRouteActive(instruction)){
tab.active = true;
}
} );
示例6: isActive
isActive(route) : boolean{
return this._router.isRouteActive(this._router.generate(route));
}
示例7: isCurrentRoute
isCurrentRoute(route) {
let instructions = this.router.generate(route);
return this.router.isRouteActive(instructions);
}
示例8: isActiveRoutes
isActiveRoutes(routes) {
return this.router.isRouteActive(this.router.generate(routes));
}
示例9: isActive
isActive(route: string) {
var instruction = this._router.generate([route]);
return this._router.isRouteActive(instruction);
}
示例10: showIntro
showIntro() {
return (this._router.isRouteActive(this._router.generate(['/Home'])));
}