Work with a custom notification template
If you need more flexibility than the BaseNotificationOptions
interface provides, you can define custom templates.
A custom template lets you:
-
Specify alignment of buttons and the indicator
-
Specify color of the indicator
-
Change the layout (composition) and behavior of the body section, with template fragments
How it works
You define a custom template with the properties of the TemplateCustom
object. You then pass the template to the templateOptions
property of the NotificationOptions
object, together with the properties of the templateData
object that defines the data to include in the notification.