Description
Is your feature request related to a problem? Please describe.
Not yet but may create a problem for it (likely related to several other reported issues in all sorts of subtle ways).
Describe the solution you'd like
Right now in order to open a modal you must pass the proper ViewContainerRef
. This is simply error prone, not versatile and frustrating for sophisticated app development at scale.
Describe alternatives you've considered
Keeping track of the current ViewContainerRef
via a service. This works in a majority of cases but due to race conditions and various asynchronous contexts this has been found to be not reliable. Simply put: requiring developers to use a ViewContainerRef
to simply open a modal is highly frustrating.
Additional context
I haven't investigated refactoring modal handling just yet but plan to. There must be a way to handle modals without dealing with ViewContainerRef
at all or rather the framework could open modals in the right context all the time without leaving it up for the developer to keep track of it since it has been found to be so error prone.