From ad9617f8e3353e3a435263ffd44aec35dbfa6934 Mon Sep 17 00:00:00 2001 From: Ales Rechtorik Date: Sat, 28 Jan 2017 22:48:59 +0100 Subject: [PATCH 1/6] add ability to open dialog with templateRef --- src/demo-app/demo-app-module.ts | 10 ++- src/demo-app/dialog/dialog-demo.html | 20 ++++- src/demo-app/dialog/dialog-demo.scss | 4 + src/demo-app/dialog/dialog-demo.ts | 116 ++++++++++++++++++++++++++- src/lib/dialog/dialog-container.ts | 41 +++++++--- src/lib/dialog/dialog-ref.ts | 10 ++- src/lib/dialog/dialog.spec.ts | 85 +++++++++++++++++++- src/lib/dialog/dialog.ts | 57 ++++++++++--- 8 files changed, 312 insertions(+), 31 deletions(-) diff --git a/src/demo-app/demo-app-module.ts b/src/demo-app/demo-app-module.ts index 47b54dbb1036..ffab8cd6399a 100644 --- a/src/demo-app/demo-app-module.ts +++ b/src/demo-app/demo-app-module.ts @@ -8,7 +8,13 @@ import {MaterialModule, OverlayContainer, FullscreenOverlayContainer} from '@angular/material'; import {DEMO_APP_ROUTES} from './demo-app/routes'; import {ProgressBarDemo} from './progress-bar/progress-bar-demo'; -import {JazzDialog, ContentElementDialog, DialogDemo, IFrameDialog} from './dialog/dialog-demo'; +import { + JazzDialog, + JazzDialogTemplateRef, + ContentElementDialog, + DialogDemo, + IFrameDialog +} from './dialog/dialog-demo'; import {RippleDemo} from './ripple/ripple-demo'; import {IconDemo} from './icon/icon-demo'; import {GesturesDemo} from './gestures/gestures-demo'; @@ -64,6 +70,7 @@ import {InputContainerDemo} from './input/input-container-demo'; IconDemo, InputContainerDemo, JazzDialog, + JazzDialogTemplateRef, ContentElementDialog, IFrameDialog, ListDemo, @@ -100,6 +107,7 @@ import {InputContainerDemo} from './input/input-container-demo'; entryComponents: [ DemoApp, JazzDialog, + JazzDialogTemplateRef, ContentElementDialog, IFrameDialog, RotiniPanel, diff --git a/src/demo-app/dialog/dialog-demo.html b/src/demo-app/dialog/dialog-demo.html index 53734bbbfdff..4e26a2d83ec9 100644 --- a/src/demo-app/dialog/dialog-demo.html +++ b/src/demo-app/dialog/dialog-demo.html @@ -1,7 +1,15 @@

Dialog demo

- - +
+ + +
+ +
+ + +
+ @@ -51,3 +59,11 @@

Other options

Last close result: {{lastCloseResult}}

+ + + + +