-
Notifications
You must be signed in to change notification settings - Fork 6.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(dialog): add md-dialog component #2855
Conversation
</button> | ||
</div> | ||
|
||
<md-dialog |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a full review for now, but I would do this as a directive that is meant to go on a template element, so it would be either of
<template mdDialog ...>
or
<div *mdDialog ...>
Mainly so that it doesn't leave a phantom md-dialog
element in the DOM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jelbourn I think that would make using inputs/outputs impossible, wouldn't it?
Any news on this? Can I help in any way? |
Closing this since it's quite stale now. As of the recent #9379, |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Needs #2853.
md-dialog
is a stateless component that's gonna be handy for people that use global state management like redux or @ngrx/store. It's also nice when you want to use standard input/output to pass data to the component inside your dialog(#2552, #2086, #2181 related).Internally it uses
openFromTemplateRef()
which is added by #2853, it disables closing by backdrop click and escape key by default(to be truly stateless), instead emitsclose
event with event data containing what caused it(escape
,backdrop
).It's got similar api to that of https://developer.mozilla.org/en/docs/Web/HTML/Element/dialog
[open]
controls whether dialog is shown or not(close)
emits event when either backdrop was clicked or escape was pressed[config]
allows passing inMdDialogConfig
@jelbourn @crisbeto