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.

Allow opening modal via class reference

See original GitHub issue

I’m submitting a … (check one with “x”)

[ ] bug report => search github for a similar issue or PR before submitting
[x] feature request
[ ] support request => Please do not submit support request here, post on Stackoverflow or Gitter

Current behavior To open a modal you have to pass an id of existing instance of component or a brand new instance of a component.

Expected behavior Allow to create a modal like this:

dialogService.open(UserProfileComponent);

What is the motivation / use case for changing the behavior?

The current problem is that I define modals per component, but I want to define per application. For example: If I have a routing component A, which defined a modal. Now If I go to route B I can no longer open the modal, becuase its instance had already been gone before entering a new route.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

6reactions
maximelafariecommented, Sep 19, 2019

It will be finally released today as 7.2.0 🎉🚀 Cheers! 🖖

6reactions
maximelafariecommented, Apr 17, 2019

Hi @Humberd and @benshabatnoam!

As it’s a well asked feature, we added it to our “May Milestone”. This new feature will be available soon and will be released as a minor version.

@marco10024 is in charge of this feature.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Modal - Bootstrap
Bootstrap's modal class exposes a few events for hooking into modal functionality. All modal events are fired at the modal itself (i.e. at...
Read more >
How to use code to open a modal in Angular 2? - Stack Overflow
First make sure after you click this button, it can open the modal. Then give this button tag an id using hashtag, for...
Read more >
Bootstrap JS Modal Reference - W3Schools
The Modal plugin is a dialog box/popup window that is displayed on top of the current page. For a tutorial about Modals, read...
Read more >
How To Implement a Modal Component in React - DigitalOcean
Build a modal component in your React project using props and state ... This allows you to hide the modal until a user...
Read more >
How to Open and Close a React-Bootstrap Modal ... - Pluralsight
Inside the App component, add a button that will open up the modal. ... In the handleShow() function, set a Boolean state value...
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