Topic: Opening a modal from a different modal
itay pro asked 6 years ago
Damian Gemza staff answered 6 years ago
@ViewChild('framee') framee: ModalDirective; showForgotModal() { this.framee.show(); }
itay pro commented 6 years ago
The problem is that the 'framee' is not a child of the comp where the button is Inspired by https://mdbootstrap.com/support/calling-modal-in-component-from-another-component/ I created a modal service that registers all modals globally in that service and then shows or hides them. I sent you a demo by emailionyx pro answered 6 years ago
Arkadiusz Idzikowski staff answered 6 years ago
itay pro commented 6 years ago
Sure The scenario is about switching from one modal to another from the modal itself. Assume there are login modal and fogotPassword components located at the bottom of homepage component. There is a login button in the homepage When the user clicks the login button the login modal opens. Then the user clicks forgot password in the login modal. How can I open the forget modal from the login modal ?FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Resolved
- ForumUser: Pro
- Premium support: No
- Technology: MDB Angular
- MDB Version: -
- Device: -
- Browser: -
- OS: -
- Provided sample code: No
- Provided link: No