當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript RouteParams.get方法代碼示例

本文整理匯總了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'));
 }
開發者ID:99999989,項目名稱:sample-manager-server,代碼行數:3,代碼來源:repo-list.ts

示例2: ngOnInit

 public ngOnInit(): void {
   let id = +this.routeParams.get('id');
   this.heroService.getHero(id)
     .then(hero => this.hero = hero);
 }
開發者ID:christianhg,項目名稱:angular2-tour-of-heroes,代碼行數:5,代碼來源:hero-detail.component.ts

示例3: ngOnInit

 ngOnInit() {
     let cc = +this._routeParams.get('count'); //convert a string to a num with (+)
     if(!cc) { cc = 15; }
     this.getWorkorders(cc);
 }
開發者ID:brentnk,項目名稱:ang2_heroes,代碼行數:5,代碼來源:prod.c.ts

示例4: constructor

 constructor(
   private _service: HeroService,
   private _router: Router,
   routeParams: RouteParams) {
     this._selectedId = +routeParams.get('id');
 }
開發者ID:chargeOne,項目名稱:angular2-typescript-myself,代碼行數:6,代碼來源:hero-list.component.ts

示例5: ngOnInit

 ngOnInit(): any {
     this.newContact = {name: this._routeParams.get('name'), address: "", phone: ""};
 }
開發者ID:satyajitdeka,項目名稱:learn-angular-2,代碼行數:3,代碼來源:new-contact.component.ts

示例6: constructor

 constructor(public http: Http, private _router: Router, private _routeParams: RouteParams) {
     this.organization = this._routeParams.get('organization');
 }
開發者ID:MicahFulton,項目名稱:GithubOrgSearch,代碼行數:3,代碼來源:organization.ts

示例7: constructor

	constructor(private appService:AppService, private routeParams: RouteParams) {
      	this._selectedId =+ routeParams.get('id');
     	this.person = this.appService.getPersonById(this._selectedId);
    }
開發者ID:zerozodix,項目名稱:angular2-workshop,代碼行數:4,代碼來源:app.content.detail.ts

示例8: ngOnInit

 ngOnInit() {
     let id = +this._routeParams.get('id');
     this._articleService.getArticle(id)
         .then(article => this.article = article);
 }
開發者ID:NesterovIlya,項目名稱:Angular2Sample,代碼行數:5,代碼來源:article.component.ts

示例9: setSessionData

 setSessionData(): void {
     this._session.state = this._params.get('state');
     this._session.code = this._params.get('code');
 }
開發者ID:Tekadan,項目名稱:Gettit,代碼行數:4,代碼來源:authentication-redirect.component.ts

示例10: ngOnInit

 ngOnInit() {
   let won = +this._routeParams.get('won');
   this._projectmappingService.getProjectMapping(won).then(projectmapping => this.projectmapping = projectmapping);
 }
開發者ID:mailtofinny,項目名稱:my-proj,代碼行數:4,代碼來源:projectmapping-detail.component.ts


注:本文中的angular2/router.RouteParams.get方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。