[1] Sets a default value for the modal options for dialogs such
as ProgressDialog that do not supply any value for the
options parameter; otherwise, progress dialogs would not
appear at all.
[2] Fix lint warnings.
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
this.onOpen$ = new EventEmitter<any>();
}
- open(options?: NgbModalOptions): Observable<any> {
+ open(options: NgbModalOptions = { backdrop: 'static' }): Observable<any> {
if (this.modalRef !== null) {
this.error('Dialog was replaced!');
this.finalize();
}
- options.backdrop="static";
+ // force backdrop to static if caller passed in any options
+ options.backdrop = 'static';
+
this.modalRef = this.modalService.open(this.dialogContent, options);
DialogComponent.instances[this.identifier] = this;