| .. | .. |
|---|
| 1 | +import { MdDialog } from '@angular/material'; |
|---|
| 1 | 2 | import { TdDataTableService, TdDataTableSortingOrder, ITdDataTableSortChangeEvent, ITdDataTableColumn } from '@covalent/core'; |
|---|
| 2 | 3 | import { IPageChangeEvent } from '@covalent/core'; |
|---|
| 3 | 4 | import { Component, AfterViewInit } from '@angular/core'; |
|---|
| 4 | 5 | import { TdMediaService } from '@covalent/core'; |
|---|
| 5 | 6 | import { PacksService } from './resources/packs'; |
|---|
| 7 | +import { PackFormComponent } from './forms/pack.form.component'; |
|---|
| 6 | 8 | |
|---|
| 7 | 9 | var pack_example = { |
|---|
| 8 | 10 | id: 7, |
|---|
| .. | .. |
|---|
| 61 | 63 | |
|---|
| 62 | 64 | constructor(private _dataTableService: TdDataTableService, |
|---|
| 63 | 65 | private media: TdMediaService, |
|---|
| 66 | + private dialog: MdDialog, |
|---|
| 67 | + private packForm: PackFormComponent, |
|---|
| 64 | 68 | private packs: PacksService) { |
|---|
| 65 | 69 | this.packs.get().subscribe( |
|---|
| 66 | 70 | list => { |
|---|
| .. | .. |
|---|
| 76 | 80 | } |
|---|
| 77 | 81 | |
|---|
| 78 | 82 | createPack() : void { |
|---|
| 79 | | - |
|---|
| 83 | + this.dialog.open(PackFormComponent, { |
|---|
| 84 | + height: '50%', // can be px or % |
|---|
| 85 | + width: '40%', // can be px or % |
|---|
| 86 | + }); |
|---|
| 80 | 87 | } |
|---|
| 81 | 88 | |
|---|
| 82 | 89 | sort(sortEvent: ITdDataTableSortChangeEvent): void { |
|---|