Dialog design
See original GitHub issueI have recently replaced md2-dialog with mdl-dialog. It however creates a lot of extra effort compared to usage of md2-dialog which did not require service / vcRef and I was able to use it with just the directive.
This is example how I was able to use it to build a Confirm component:
<mdl-dialog #confirmDialog>
<div class="mdl-dialog__content">{{ message }}</div>
<div class="mdl-dialog__actions">
<button type="button" class="mdl-button" (click)="action.emit()">Yes</button>
<button type="button" class="mdl-button close" (click)="confirmDialog.close()">No</button>
</div>
</md2-dialog>
<div (click)="confirmDialog.show()">
<ng-content></ng-content>
</div>
I have used this component by wrapping remove icon like this:
<confirm
title="Remove Post"
message="You are you sure?"
[skip]="!post.id"
(action)="remove.emit()">
<mdl-button mdl-button-type="icon">
<mdl-icon>cancel</mdl-icon>
</mdl-button>
</confirm>
Issue Analytics
- State:
- Created 7 years ago
- Comments:25 (21 by maintainers)
Top Results From Across the Web
DIALOG - LinkedIn
We believe design can, and should, meaningfully improve the wellbeing of our communities ... DIALOG. Design Services. Calgary, Alberta 27,560 followers.
Read more >Dialog Design - Tutorialspoint
Dialog Design, A dialog is the construction of interaction between two or more beings or systems. In HCI, a dialog is studied at...
Read more >Dialog Design Co.: Branding & Websites for Entrepreneurs
Based in Eau Claire, Wisconsin, we help entrepreneurs create brands & websites that get more people talking about their business and generate more...
Read more >Dialog - Dribbble
Dialog. 1,129 inspirational designs, illustrations, and graphic elements from the world's best designers. Want more inspiration? Browse our search results.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@tb thx for your feedback!
I don’t know. This seems to be the way a simple TemplateRef works. Just to make it clear: you can only show one instance at once. but if you have closed the dialog the same dialog can be shown again.
closing this issue. need some documentation to do and hopefully release version 2.0 tomorrow.
@mseemann Great work! I checked it works great!
For my current use cases I have no problem with one instance limitation. Do you think its fixable in future?