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