You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+29-6
Original file line number
Diff line number
Diff line change
@@ -105,22 +105,45 @@ There are four types of body renderings: trustedHtml', 'template', 'templateWith
105
105
- directive
106
106
- Will use the `toast.body` argument to represent the name of a directive that you want to render as the toast's body, else it will fallback to the template bound to the `'body-template': 'toasterBodyTmpl.html'` configuration option.
107
107
108
-
```js
108
+
```js
109
109
// The toast pop call, passing in a directive name to be rendered
110
110
toaster.pop({
111
-
type: 'info',
112
-
body: 'bind-unsafe-html',
113
-
bodyOutputType: 'directive'
111
+
type: 'info',
112
+
body: 'bind-unsafe-html',
113
+
bodyOutputType: 'directive'
114
114
});
115
-
```
116
-
```js
115
+
```
116
+
117
+
```js
117
118
// The directive that will be dynamically rendered
There are additional documented use cases in these [tests](test/directiveTemplateSpec.js).
124
147
125
148
All four options can be configured either globally for all toasts or individually per toast.pop() call. If the `body-output-type` option is configured on the toast, it will take precedence over the global configuration for that toast instance.
0 commit comments