当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript router.RouteTree类代码示例

本文整理汇总了TypeScript中@angular/router.RouteTree的典型用法代码示例。如果您正苦于以下问题:TypeScript RouteTree类的具体用法?TypeScript RouteTree怎么用?TypeScript RouteTree使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了RouteTree类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: routerOnActivate

 routerOnActivate(curr:RouteSegment, prev?:RouteSegment, currTree?:RouteTree, prevTree?:RouteTree):void {
   const id = Number(curr.getParam('id'));
   this._contactsService.getContact(id).subscribe(contact => this.contact = contact);
   this.baseSegments = currTree.parent(curr).urlSegments.map((x: UrlSegment) => x.segment);
   this.baseSegments.unshift('/');
   this.editSegments = this.baseSegments.concat(['edit']);
 }
开发者ID:yuxhuang,项目名称:angular2-starter,代码行数:7,代码来源:contact-details.component.ts

示例2: routerOnActivate

  routerOnActivate(current: RouteSegment, prev?: RouteSegment,
      currTree?: RouteTree, prevTree?: RouteTree) {
      const id = +currTree.parent(current).getParam('id');

      console.log("Getting data for user with ID = ", id);

      this.dataService.getCustomer(id)
          .subscribe((customer: ICustomer) => this.customer = customer);
  }
开发者ID:srinathsj92,项目名称:reflexcmpe282,代码行数:9,代码来源:customerDetails.component.ts

示例3: routerOnActivate

 routerOnActivate(current: RouteSegment, prev?: RouteSegment,
   currTree?: RouteTree, prevTree?: RouteTree) {
     
   this.user = this.authService.user;
     
   const id = +currTree.parent(current).getParam('id');
   this.dataService.getCustomer(id)
       .subscribe((customer: ICustomer) => {
           this.customer = customer;
       });   
    
 }
开发者ID:Anhmike,项目名称:Angular2-CustomerManager,代码行数:12,代码来源:customerOrders.component.ts

示例4: routerOnActivate

 routerOnActivate(curr: RouteSegment, prev: RouteSegment, currTree: RouteTree) {
     this.currSegment = curr;
     this.selectedId = +currTree.parent(curr).getParam('id');
     //this.service.getAllMenuItems().then(list => this.itemList = list);
 }
开发者ID:leoalmeida,项目名称:trabalhofinal,代码行数:5,代码来源:links.component.ts

示例5: routerOnActivate

 routerOnActivate(curr: RouteSegment, prev: RouteSegment, currTree: RouteTree) {
     this.currSegment = curr;
     this.selectedId = +currTree.parent(curr).getParam('id');
     this.service.getCrises().then(crises => this.crises = crises);
 }
开发者ID:taoveweb,项目名称:angular2,代码行数:5,代码来源:crisis-list.component.ts

示例6: routerOnActivate

  routerOnActivate(curr: RouteSegment, prev: RouteSegment, currTree: RouteTree) {
     this.currSegment = curr;
     this.selectedId = +currTree.parent(curr).getParam('id');
     this.service.getFriends().subscribe(friends => this.friends = friends);
 }
开发者ID:Akrobate,项目名称:attractive-network,代码行数:5,代码来源:app.friends.ts


注:本文中的@angular/router.RouteTree类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。