ngx-modalx
v1.0.0
Published
This library is for displaying components inside a modal container.
Downloads
8
Readme
NgxModalx
This library is for displaying components inside a modal container.
Clicking outside the modal's content component closes the modal by default. Pressing escape when the modal is open closes the modal by default.
Usage:
- Import the module:
import {NgxModalxService} from "ngx-modalx";
- Inject the service, forexample:
const modalxService = inject(NgxModalxService);
- Then display any component inside the modal with the open function:
this.modalxService.open(ExampleComponent as Type<Component>)
- Possible to change the default settings (close on click, close on escape pressed):
this.modalService.open(ExampleComponent as Type<Component>, {escCloses: false, clickCloses: false})