In my Angular 4 app, let\'s assume that I\'m inside a service.
At some point, I want to ask the user for a confirmation, currently I\'m doing it with just a co
Try with below option which is working for me. callbackOnModelWindowClose is the return value.
@Output() callbackOnModelWindowClose: EventEmitter = new EventEmitter();
const initialState = {
isModelWindowView: true, bodyStyle: 'row', gridDataList: this.scheduleList
};
this.modalRef = this.modalService.show(YourComponent,
Object.assign({}, this.modalConfig, { class: 'modal-dialog-centered', initialState });
this.modalRef.content.callbackOnModelWindowClose.take(1).subscribe(() => {
your code here..
});