本文整理汇总了TypeScript中angular2/router.RouteData类的典型用法代码示例。如果您正苦于以下问题:TypeScript RouteData类的具体用法?TypeScript RouteData怎么用?TypeScript RouteData使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了RouteData类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。
示例1: constructor
constructor(params: RouteParams
, data: RouteData
) {
this.productID = params.get('id');
console.log("Is this prod environment?" + data.get('isProd'));
}
开发者ID:yuvagit,项目名称:Angular2,代码行数:7,代码来源:product_param.ts
示例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();
}
}
开发者ID:kamfasage,项目名称:angular-spring-dynamic-form,代码行数:20,代码来源:customer.ts
示例3: constructor
constructor(public params:RouteParams, data: RouteData) {
this.productID = params.get('id');
console.log(`Is this prod environment: ${data.get('isProd')}`);
}
开发者ID:israa-ia1205702,项目名称:Examples,代码行数:5,代码来源:router-example.ts
示例4: constructor
constructor(private _data: RouteData, private router: Router) {
this.options = _data.get('options');
}
开发者ID:Domcik8,项目名称:clubby,代码行数:3,代码来源:tabs.component.ts
示例5: constructor
constructor(
private routeData: RouteData) {
this.isEditRoute = routeData.get('isEditRoute')
}
开发者ID:Ellipizle,项目名称:angular2-redux-complex-ui,代码行数:4,代码来源:image-detail-row.ts
示例6: constructor
constructor (private routeParams: RouteParams, private routeData: RouteData) {
this.message = this.routeParams.get('message');
this.data = this.routeData.get('passedData');
}
开发者ID:HilmiDEV,项目名称:augury,代码行数:4,代码来源:router-data1.ts
示例7: constructor
constructor(routeData: RouteData) {
this.count = routeData.get('count');
this.books = routeData.get('books');
}
开发者ID:adamayres,项目名称:peeps2,代码行数:4,代码来源:book.ts
示例8: constructor
constructor(params: RouteParams, data: RouteData){
this.id = params.get('id');
console.log(data.get('project'));
}
开发者ID:2947721120,项目名称:angular-2-samples,代码行数:4,代码来源:about.ts
示例9: constructor
constructor(private _params: RouteParams, private _data: RouteData){
this.name = _params.get('name');
this.age = +_params.get('age');
this.data = _data.get('inside');
}
开发者ID:lokeshjain2008,项目名称:angular2Trial,代码行数:6,代码来源:hero-child.ts
注:本文中的angular2/router.RouteData类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论