Honestly why? Can't it use root component's ViewContainerRef
by default? Sure, when you are making a demo and triggering the snackbar from a component upon a button click, getting hold of ViewContainerRef
is easy. But you know, in real life, you are probably going to be triggering it from a service, or an effect, and there's no easy way to get hold of any ViewContainerRef
there, making snackbar extremely annoying to use.
But you know, in real life, you are probably going to be triggering it from a service, or an effect, and there's no easy way to get hold of any ViewContainerRef there
We don't have a way of getting access to one either. See https://github.com/angular/angular/issues/9293
I'm trying to get support for this added to core before Material gets to beta.
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
_This action has been performed automatically by a bot._
Most helpful comment
We don't have a way of getting access to one either. See https://github.com/angular/angular/issues/9293
I'm trying to get support for this added to core before Material gets to beta.