If the user session times out then he is redirected to the login page.
Problem: If they have a modal open then it remains open when the user is redirected.
What is a good centralized way to close any active modal upon some event (session timeout) using ng-bootstrap that doesn't involve putting code in every modal (or base class) or wrapping the NgbModal service?
I am using Angular 4, Bootstrap 4, and ng-bootstrap.