What would be the best way to implement a general Angular 2+ (v5 in my app) service for opening a BootstrapV4 modal with ngx-bootstrap?
I need a general modal dialog which can take a string Input (title of a model) and EventEmitter Output (with a boolean value) that can be used for confirmation of deleting an item and I do not want to create a new dialog every time this pattern occur.
I know how to use the BsModalService for opening a modal from a component, but how can I make it reusable?
I'm sure you can build this service on top of BsModalService.
Examples:
https://valor-software.com/ngx-bootstrap/#/modals#service-component
https://valor-software.com/ngx-bootstrap/#/modals#confirm-window
Check this component: ngx-modal-dialog. It's css framework agnostic, so you can easily use it with bootstrap or something else. It supports:
Check this page for (kinda) demo: Modal dialog demo
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With