I\'m using this code to display toasts on an AngularJS site. I need to know how to put a line break () into the body. When I use the options shown in
There are two ways to allow some HTML tags, including line breaks, in a toast.
Include 'body-output-type': 'trustedHtml' in toaster-options:
Or include 'trustedHtml' in a call to toaster.pop():
toaster.pop('success', 'Saved', 'Saved
it!', 3000, 'trustedHtml');
or
toaster.pop({
type: 'success',
title: 'Saved',
text: 'Saved
it!',
bodyOutputType: 'trustedHtml'
});
Source