本文整理匯總了TypeScript中@angular/router-deprecated.RouteData.get方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript RouteData.get方法的具體用法?TypeScript RouteData.get怎麽用?TypeScript RouteData.get使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類@angular/router-deprecated.RouteData
的用法示例。
在下文中一共展示了RouteData.get方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: getParamOrData
private getParamOrData(key: string, params: RouteParams, data: RouteData) {
let result = params.get(key);
if (!isBlank(result)) {
return result;
} else {
return data.get(key);
}
}
示例2: constructor
constructor(private routeParams: RouteParams, private routeData: RouteData) {
this.message = this.routeParams.get('message');
this.data = this.routeData.get('passedData')
}
示例3: constructor
constructor(private _data: RouteData) {
//when arriving directly from /login URL
this.signInOnly = this._data.get('signInOnly') || true; // set default to false to re-activate the destination form
}
示例4: constructor
constructor(params: RouteParams, data: RouteData){
this.id = params.get('id');
console.log(data.get('project'));
}