Topic: MDB Modal Dynamic don't use already existing data service
MatDepInfo free asked 4 years ago
I used Modal from ngx-bootstrap and I try to switch to MDB Modal. I use Modal with Dynamic Modal Options.
Before I use (with private modalService: BsModalService):
this.modal = this.modalService.show(AppModalFormComponent, { initialState: { form: this }, backdrop: 'static' });
Now (with private modalService: MDBModalService):
this.modal = this.modalService.show(AppModalFormComponent, {
backdrop: true,
keyboard: true,
focus: true,
show: false,
ignoreBackdropClick: false,
class: '',
containerClass: '',
animated: true,
data: {
form: this,
}
});
In both case, modal is showing via AppModalFormComponent. In this component, I use a service (FormService with a console log in the constructor of the service). In the first case (ngx-bootstrap), the contructor service is not showing (because already initialized) and I can access to service data. In the second one (MDB), service constructor is showing (while it is already initialized) and data is undefined. Why ?
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Opened
- ForumUser: Free
- Premium support: No
- Technology: MDB Angular
- MDB Version: 9.1.0
- Device: MBP
- Browser: Safari
- OS: Catalina
- Provided sample code: No
- Provided link: No