本文整理匯總了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'])));
}