I use components which i open within a modal. For example:
const modalRef = this.modalService.open(AbortModalComponent);
Within these modal-components i can inject
NgbActiveModal to close the modal with
this.activeModal.dismiss();. So far so good, but if i inject
NgbActiveModal outside of the modal to close it from somewhere else it doesn’t.
It seems like
NgbActiveModal isn’t a singleton all over the app. But how can i make it one?
In app.module.ts i only import
Within my sub-modules i import
Hope i described it good enough. Took me hours to make a Plunker last time 🙂