Content
The Notification provides options for controlling its content.
To configure the content, use any of the following approaches:
Passing a String
Passing a string to the content
field is the basic way to display a notification message. The text that is passed represents the rendered content of the notification.
Using Templates
To set a template for the content area of the Notification, pass a TemplateRef
to the content
field of the show
method.
Rendering a Component
To render a component in the content area of the Notification, pass a component type in the content
field of the show
method.
Register all dynamically created components as
entryComponents
in theNgModule
of the application. Otherwise, Angular throws ano component factory exists for the component
runtime error.