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
+15-14
Original file line number
Diff line number
Diff line change
@@ -1,16 +1,16 @@
1
1
AngularJS-Toaster
2
2
=================
3
3
4
-
**AngularJS Toaster** is an AngularJS port of the **toastr** non-blocking notification jQuery library. It requires AngularJS v1.2.6 or higher and angular-animate for the CSS3 transformations.
4
+
**AngularJS Toaster** is an AngularJS port of the **toastr** non-blocking notification jQuery library. It requires AngularJS v1.2.6 or higher and angular-animate for the CSS3 transformations.`angular-sanitize` is required if using the `html` bodyOutputType.
@@ -185,11 +185,12 @@ The close button html can be overridden either globally or per toast call.
185
185
### Body Output Type
186
186
The rendering of the body content is configurable at both the Global level, which applies to all toasts, and the individual toast level when passed as an argument to the toast.
187
187
188
-
There are four types of body renderings: 'trustedHtml', 'template', 'templateWithData', 'directive'.
188
+
There are five types of body renderings: 'html', 'trustedHtml', 'template', 'templateWithData', 'directive'.
189
+
190
+
- html: When using this configuration, the toast will bind the toast.html to `ng-bind-html`. If the `angular-sanitize` library is not loaded, an exception will be thrown.
189
191
190
192
- trustedHtml: When using this configuration, the toast will parse the body content using
191
-
`$sce.trustAsHtml(toast.body)`.
192
-
If the html can be successfully parsed, it will be bound to the toast via `ng-bind-html`. If it cannot be parsed as "trustable" html, an exception will be thrown.
193
+
`$sce.trustAsHtml(toast.body)`. It will bypass any sanitization. Only use this option if you own and trust the html content!
193
194
194
195
- template: Will use the `toast.body` if passed as an argument, else it will fallback to the template bound to the `'body-template': 'toasterBodyTmpl.html'` configuration option.
195
196
@@ -243,7 +244,7 @@ There are four types of body renderings: 'trustedHtml', 'template', 'templateWit
243
244
244
245
There are additional documented use cases in these [tests](test/directiveTemplateSpec.js).
245
246
246
-
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.
247
+
All five 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.
247
248
248
249
- Globally:
249
250
@@ -396,14 +397,14 @@ If you do not want to use animations, you can safely remove the angular-animate.
396
397
}, 0);
397
398
```
398
399
399
-
## Author
400
-
**Jiri Kavulak**
400
+
## Authors
401
+
**Jiri Kavulak, Stabzs**
401
402
402
403
## Credits
403
404
Inspired by http://codeseven.github.io/toastr/demo.html.
0 commit comments