A simple Angular 8 dialog, with built-in solutions for features including:
- Alert
- Confirm
- Custom Dialog Content
npm install ng-modl- Import BrowserAnimationsModule and NgModlModule
import {AppComponent} from './app.component';
import {NgModule} from '@angular/core';
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
import {NgModlModule} from 'ng-modl';
@NgModule({
imports: [
// ...
BrowserAnimationsModule,
NgModlModule,
// ...
],
bootstrap: [AppComponent]
})
export class AppModule { }- Inject NgModlService
import {Component} from '@angular/core';
import {NgModlService} from 'ng-modl';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss']
})
export class AppComponent {
constructor(private modlService: NgModlService) {
}
}width(number| default: ) set dialog widthheight(number| default: ) set dialog heightminWidth(number| default: ) set dialog minWidthminHeight(number| default: ) set dialog minHeightmaxWidth(number| default: ) set dialog maxWidthmaxHeight(number| default: ) set dialog maxHeightinputs({[field: string]: any}| default: ) set inputsoutputs({[field: string]: $event => any}| default: ) handle output events