ngOnDestroy() {
if (!this.$modal)
return;
this.$modal.data('bs.modal', null);
this.$modal.remove();
}
since in some cases, if you never actaully open a modal, yet the ModalComponent gets instantiated by the View, the $modal will not exist on the destroy, so please add if (!this.$modal) return;
please fix in:
since in some cases, if you never actaully open a modal, yet the ModalComponent gets instantiated by the View, the $modal will not exist on the destroy, so please add if (!this.$modal) return;
tx
Sean