rsanchez
2017-03-10 ac8d1f0e8ab4bab6eb546daa8062a6dad3ab8e23
securis/src/main/webapp/src/app/pack.list.component.ts
....@@ -1,8 +1,10 @@
1
+import { MdDialog } from '@angular/material';
12 import { TdDataTableService, TdDataTableSortingOrder, ITdDataTableSortChangeEvent, ITdDataTableColumn } from '@covalent/core';
23 import { IPageChangeEvent } from '@covalent/core';
34 import { Component, AfterViewInit } from '@angular/core';
45 import { TdMediaService } from '@covalent/core';
56 import { PacksService } from './resources/packs';
7
+import { PackFormComponent } from './forms/pack.form.component';
68
79 var pack_example = {
810 id: 7,
....@@ -61,6 +63,8 @@
6163
6264 constructor(private _dataTableService: TdDataTableService,
6365 private media: TdMediaService,
66
+ private dialog: MdDialog,
67
+ private packForm: PackFormComponent,
6468 private packs: PacksService) {
6569 this.packs.get().subscribe(
6670 list => {
....@@ -76,7 +80,10 @@
7680 }
7781
7882 createPack() : void {
79
-
83
+ this.dialog.open(PackFormComponent, {
84
+ height: '50%', // can be px or %
85
+ width: '40%', // can be px or %
86
+ });
8087 }
8188
8289 sort(sortEvent: ITdDataTableSortChangeEvent): void {