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
+13-8Lines changed: 13 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,9 +4,13 @@ AngularJS-Toaster
4
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.
AngularJS-Toaster requires AngularJS v1.2.6 or higher and specifically targets AngularJS, not Angular 2, although it could be used via ngUpgrade.
13
+
If you are looking for the Angular 2 port of AngularJS-Toaster, it is located [here](https://github.com/Stabzs/Angular2-Toaster).
10
14
11
15
## Demo
12
16
- Simple demo is at http://plnkr.co/edit/HKTC1a
@@ -129,8 +133,8 @@ There are four types of body renderings: trustedHtml', 'template', 'templateWith
129
133
130
134
- directive
131
135
- 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.
132
-
The directive name being passed to the `body` argument should be normalized as it exists in the markup,
133
-
not camelCased as it would appear in the directive declaration (`cool-directive-name` instead of `coolDirectiveName`).
136
+
The directive name being passed to the `body` argument should appear as it exists in the markup,
137
+
not camelCased as it would appear in the directive declaration (`cool-directive-name` instead of `coolDirectiveName`). The directive must be usable as an attribute.
134
138
135
139
```js
136
140
// The toast pop call, passing in a directive name to be rendered
@@ -149,7 +153,8 @@ There are four types of body renderings: trustedHtml', 'template', 'templateWith
149
153
};
150
154
}])
151
155
```
152
-
- Will use the `toast.directiveData` argument to accept data that will be bound to the directive's scope.
156
+
- Will use the `toast.directiveData` argument to accept data that will be bound to the directive's scope. The directive cannot use isolateScope and will
157
+
throw an exception if isolateScope is detected. All data must be passed via the directiveData argument.
153
158
154
159
```js
155
160
// The toast pop call, passing in a directive name to be rendered
@@ -275,7 +280,7 @@ If you do not want to use animations, you can safely remove the angular-animate.
275
280
### Common Issues
276
281
- Toaster always shows up as "info"
277
282
- Your `<toaster-container></toaster-container` might be placed inside of your routing directive.
278
-
- You have multiple `<toaster-container></toaster-container` elements without unqiue`toaster-id` configuration arguments.
283
+
- You have multiple `<toaster-container></toaster-container` elements without unique`toaster-id` configuration arguments.
279
284
-[$sce:itype] Attempted to trust a non-string value in a content requiring a string
280
285
- You have not specified: `bodyOutputType: 'trustedHtml'` when passing html as a body argument.
281
286
- My toasts do not show up when I pop them, but after I perform another action.
@@ -294,7 +299,7 @@ If you do not want to use animations, you can safely remove the angular-animate.
294
299
Inspired by http://codeseven.github.io/toastr/demo.html.
0 commit comments