rsanchez
2017-03-15 a6b5178c7295be4525ee0f607e42f72a12a2e3d6
securis/src/main/webapp/src/app/pack.list.component.ts
....@@ -1,4 +1,4 @@
1
-import { Router } from '@angular/router';
1
+import { Router, ActivatedRoute } from '@angular/router';
22 import { MdDialog, MdDialogConfig } from '@angular/material';
33 import { TdDataTableService, TdDataTableSortingOrder, ITdDataTableSortChangeEvent, ITdDataTableColumn } from '@covalent/core';
44 import { IPageChangeEvent } from '@covalent/core';
....@@ -54,7 +54,7 @@
5454 { name: 'application_name', label: 'App name' },
5555 { name: 'licensetype_code', label: 'License type' },
5656 { name: 'organization_name', label: 'Organization' },
57
- { name: 'used_licenses', label: 'Lics', tooltip: 'Initial/Available pack licenses' },
57
+ { name: 'used_licenses', label: 'Licenses', tooltip: 'Initial/Available pack licenses' },
5858 { name: 'menu', label: '' }
5959 ];
6060
....@@ -87,6 +87,7 @@
8787 constructor(private _dataTableService: TdDataTableService,
8888 private media: TdMediaService,
8989 private router: Router,
90
+ private route: ActivatedRoute,
9091 private dialog: MdDialog,
9192 private $L: LocaleService,
9293 private packForm: PackFormComponent,
....@@ -114,7 +115,7 @@
114115 }
115116
116117 showLicenses(pack: any) : void {
117
- this.router.navigateByUrl('/licenses');
118
+ this.router.navigate([`${pack.id}/licenses`], {relativeTo: this.route});
118119 }
119120
120121 editPack(pack: any) : void {