Appending to Dynamic Containers

The Notification service allows you to define a container to which the Notification will be appended.

To provide a ViewContainerRef element, use the appendTo property. Тhe Notification service should be added to the providers array of the component, if the specified appendTo element is part of the view, which the component renders through the route navigation, or if at some point it is destroyed by the application logic.

Example
View Source
Edit In Stackblitz  
Change Theme:

In this article

Not finding the help you need?