🚨 🚨 🚨
This package is still under development and is not optimized nor tested. Please have some time and check back later ;)
🚨 🚨 🚨
The purpose of this packages is to allow the display a (modal-)component, within everywhere inside of the application. The (modal-)component will be rendert inside of the outlet.
$ npm i ng-modal-factory
@NgModule({
...
imports: [
...,
ModalFactoryModule
]
...
})
export class AppModule { }
...
<ng-modal-factory-outlet></ng-modal-factory-outlet>
...
public openModal()
{
this.modalFactoryService.openNewAlertModal({
component: AlertModalComponent, <-- Your modal component
inputs: {
bodyTemplate: this.modalBody, <-- Your modal body
buttons: [
{
text: 'custom',
style: 'link',
click: () => console.log('custom')
},
{
text: 'Cancel',
style: 'outline',
click: () => console.log('Cancel'),
},
{
text: 'Ok',
type: 'primary',
click: () => console.log('Ok'),
},
],
},
});
}