question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

I 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:closed
  • Created 7 years ago
  • Comments:25 (21 by maintainers)

github_iconTop GitHub Comments

1reaction
mseemanncommented, Oct 10, 2016

@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.

0reactions
tbcommented, Oct 10, 2016

@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?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dialog Design
Great design can change the world.
Read more >
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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found