本文整理汇总了TypeScript中angular2/router.RouteParams.get方法的典型用法代码示例。如果您正苦于以下问题:TypeScript RouteParams.get方法的具体用法?TypeScript RouteParams.get怎么用?TypeScript RouteParams.get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类angular2/router.RouteParams
的用法示例。
在下文中一共展示了RouteParams.get方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: constructor
constructor(github: Github, params: RouteParams) {
this.repos = github.getReposForOrg(params.get('org'));
}
示例2: ngOnInit
public ngOnInit(): void {
let id = +this.routeParams.get('id');
this.heroService.getHero(id)
.then(hero => this.hero = hero);
}
示例3: ngOnInit
ngOnInit() {
let cc = +this._routeParams.get('count'); //convert a string to a num with (+)
if(!cc) { cc = 15; }
this.getWorkorders(cc);
}
示例4: constructor
constructor(
private _service: HeroService,
private _router: Router,
routeParams: RouteParams) {
this._selectedId = +routeParams.get('id');
}
示例5: ngOnInit
ngOnInit(): any {
this.newContact = {name: this._routeParams.get('name'), address: "", phone: ""};
}
示例6: constructor
constructor(public http: Http, private _router: Router, private _routeParams: RouteParams) {
this.organization = this._routeParams.get('organization');
}
示例7: constructor
constructor(private appService:AppService, private routeParams: RouteParams) {
this._selectedId =+ routeParams.get('id');
this.person = this.appService.getPersonById(this._selectedId);
}
示例8: ngOnInit
ngOnInit() {
let id = +this._routeParams.get('id');
this._articleService.getArticle(id)
.then(article => this.article = article);
}
示例9: setSessionData
setSessionData(): void {
this._session.state = this._params.get('state');
this._session.code = this._params.get('code');
}
示例10: ngOnInit
ngOnInit() {
let won = +this._routeParams.get('won');
this._projectmappingService.getProjectMapping(won).then(projectmapping => this.projectmapping = projectmapping);
}