本文整理匯總了TypeScript中angular2/router.RouteData.get方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript RouteData.get方法的具體用法?TypeScript RouteData.get怎麽用?TypeScript RouteData.get使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類angular2/router.RouteData
的用法示例。
在下文中一共展示了RouteData.get方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: constructor
constructor(params: RouteParams
, data: RouteData
) {
this.productID = params.get('id');
console.log("Is this prod environment?" + data.get('isProd'));
}
示例2: constructor
constructor(private http:Http,private router:Router,private form: FormBuilder,private routeParams:RouteParams,routeData: RouteData) {
this.customer = {};
this.nbErrors = 0;
this.isEdition = routeData.get('isEdition');
this.customerForm = form.group({
firstName: ['', Validators.required],
lastName: ['', Validators.required]
});
this.customerForm.valueChanges.subscribe(() => {
if(this.customerForm.errors) {
this.nbErrors = Object.keys(this.customerForm.errors).length;
}
});
if(this.isEdition) {
this.getCustomer();
}
}
示例3: constructor
constructor(public params:RouteParams, data: RouteData) {
this.productID = params.get('id');
console.log(`Is this prod environment: ${data.get('isProd')}`);
}
示例4: constructor
constructor(private _data: RouteData, private router: Router) {
this.options = _data.get('options');
}
示例5: constructor
constructor(
private routeData: RouteData) {
this.isEditRoute = routeData.get('isEditRoute')
}
示例6: constructor
constructor (private routeParams: RouteParams, private routeData: RouteData) {
this.message = this.routeParams.get('message');
this.data = this.routeData.get('passedData');
}
示例7: constructor
constructor(routeData: RouteData) {
this.count = routeData.get('count');
this.books = routeData.get('books');
}
示例8: constructor
constructor(params: RouteParams, data: RouteData){
this.id = params.get('id');
console.log(data.get('project'));
}
示例9: constructor
constructor(private _params: RouteParams, private _data: RouteData){
this.name = _params.get('name');
this.age = +_params.get('age');
this.data = _data.get('inside');
}