当前位置: 首页>>代码示例>>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;未经允许,请勿转载。