Joaquín Reñé
4 hours ago c5b1e27a77081717f37942de8dacfa5c2e30b09d
securis/src/main/webapp/src/app/listing/pack.list.component.ts
....@@ -10,12 +10,13 @@
1010 TdPagingBarComponent
1111 } from '@covalent/core';
1212 import { IPageChangeEvent } from '@covalent/core';
13
-import { Component, ViewChild, AfterViewInit } from '@angular/core';
14
-import { TdMediaService } from '@covalent/core';
13
+import { Component, ViewChild, AfterViewInit, Inject } from '@angular/core';
14
+import { TdMediaService} from '@covalent/core';
1515 import { PacksService, PACK_ACTIONS, PacksFilter } from '../resources/packs';
1616 import { PackFormComponent } from '../forms/pack.form.component';
1717 import { LocaleService } from '../common/i18n';
1818 import { ListingBase } from './base';
19
+import { Injector } from '@angular/core';
1920
2021 /**
2122 var pack_example = {
....@@ -53,6 +54,8 @@
5354 })
5455 export class PackListComponent extends ListingBase implements AfterViewInit {
5556
57
+ private packs: PacksService;
58
+
5659 columns: ITdDataTableColumn[] = [
5760 { name: 'code', label: 'Code', tooltip: 'License pack code' },
5861 { name: 'application_name', label: 'App name' },
....@@ -67,16 +70,16 @@
6770 filter_description : string;
6871 prevUrl : string = null;
6972
70
- constructor(_dataTableService: TdDataTableService,
73
+ constructor(private injector: Injector,
74
+ _dataTableService: TdDataTableService,
7175 private media: TdMediaService,
7276 private router: Router,
7377 private route: ActivatedRoute,
7478 private dialog: MdDialog,
7579 private $L: LocaleService,
76
- private toaster: ToastsManager,
77
- private packForm: PackFormComponent,
78
- private packs: PacksService) {
79
- super(_dataTableService);
80
+ private toaster: ToastsManager) {
81
+ super(_dataTableService);
82
+ this.packs = this.injector.get(PacksService);
8083 }
8184
8285 reload(filter?: PacksFilter) : void {