Skip to content

Commit

Permalink
fxlayout
Browse files Browse the repository at this point in the history
  • Loading branch information
brianParcel committed Feb 22, 2018
1 parent a791823 commit 9b81d93
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
<p>
dialog-remove works!
</p>


<div style="height:100%" fxLayout="row" fxLayoutAlign="center end">

<div fxLayout="row" fxLayoutAlign="center start">
Title
</div>

<div fxLayout="row" fxLayoutAlign="center end">
<button mat-raised-button (click)="onCancel()">Cancel</button>
<button mat-raised-button (click)="onDelete()">Delete</button>
</div>
</div>


Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Component, OnInit } from '@angular/core';
import { Component, OnInit, Inject } from '@angular/core';
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';

@Component({
selector: 'app-dialog-remove',
Expand All @@ -7,9 +8,11 @@ import { Component, OnInit } from '@angular/core';
})
export class DialogRemoveComponent implements OnInit {

constructor() { }
constructor(public dialogRef: MatDialogRef<DialogRemoveComponent>,
@Inject(MAT_DIALOG_DATA) public data: any) { }

ngOnInit() {

}

}
4 changes: 2 additions & 2 deletions src/app/helpers/util.helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export class Util {
//************************************

static openDefaultDialog(config?:any): any{
if(!config) config = {width: '250px', height:'250px', data: { name: 'test', animal: 'test' }};
if(!config) config = {width: '250px', height:'250px', data: { title: 'title test', body: 'body test' }};

let dialog = this.dialog.open(DialogDefaultComponent, config);
return dialog;
Expand All @@ -50,7 +50,7 @@ export class Util {


static openRemoveDialog(config?:any): any {
if(!config) config = {width: '250px', height:'250px', data: { name: 'test', animal: 'test' }};
if(!config) config = {width: '250px', height:'250px', data: { title: 'title test', body: 'body test' }};

let dialog = this.dialog.open(DialogRemoveComponent, config);
return dialog;
Expand Down

0 comments on commit 9b81d93

Please sign in to comment.