ngx-toastr 9.0.2 → 9.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -2
- package/bundles/ngx-toastr.umd.js +214 -86
- package/bundles/ngx-toastr.umd.js.map +1 -1
- package/bundles/ngx-toastr.umd.min.js +1 -1
- package/bundles/ngx-toastr.umd.min.js.map +1 -1
- package/esm2015/ngx-toastr.js +1 -2
- package/esm2015/overlay/overlay-container.js +11 -5
- package/esm2015/overlay/overlay-ref.js +6 -4
- package/esm2015/overlay/overlay.js +26 -8
- package/esm2015/portal/dom-portal-host.js +21 -9
- package/esm2015/portal/portal.js +8 -4
- package/esm2015/public_api.js +1 -2
- package/esm2015/toastr/toast-injector.js +18 -6
- package/esm2015/toastr/toast-noanimation.component.js +79 -25
- package/esm2015/toastr/toast.component.js +117 -34
- package/esm2015/toastr/toast.directive.js +6 -4
- package/esm2015/toastr/toastr-config.js +164 -151
- package/esm2015/toastr/toastr.module.js +2 -3
- package/esm2015/toastr/toastr.service.js +95 -64
- package/esm5/ngx-toastr.js +1 -2
- package/esm5/overlay/overlay-container.js +12 -5
- package/esm5/overlay/overlay-ref.js +6 -4
- package/esm5/overlay/overlay.js +42 -8
- package/esm5/portal/dom-portal-host.js +23 -9
- package/esm5/portal/portal.js +8 -4
- package/esm5/public_api.js +1 -2
- package/esm5/toastr/toast-injector.js +18 -6
- package/esm5/toastr/toast-noanimation.component.js +81 -26
- package/esm5/toastr/toast.component.js +127 -38
- package/esm5/toastr/toast.directive.js +6 -4
- package/esm5/toastr/toastr-config.js +164 -151
- package/esm5/toastr/toastr.module.js +2 -3
- package/esm5/toastr/toastr.service.js +115 -68
- package/fesm2015/ngx-toastr.js +194 -76
- package/fesm2015/ngx-toastr.js.map +1 -1
- package/fesm5/ngx-toastr.js +245 -85
- package/fesm5/ngx-toastr.js.map +1 -1
- package/ngx-toastr.metadata.json +1 -1
- package/package.json +4 -4
- package/toastr/toast-noanimation.component.d.ts +1 -0
- package/toastr/toast.component.d.ts +2 -0
- package/toastr/toastr.service.d.ts +3 -3
package/README.md
CHANGED
@@ -29,6 +29,14 @@ DEMO: https://scttcper.github.io/ngx-toastr/
|
|
29
29
|
[Web Animations API](https://angular.io/docs/ts/latest/guide/animations.html)
|
30
30
|
- Output toasts to an optional target directive
|
31
31
|
|
32
|
+
## Dependencies
|
33
|
+
Latest version available for each version of Angular
|
34
|
+
|
35
|
+
| ngx-toastr | Angular |
|
36
|
+
| ------------ | ------- |
|
37
|
+
| 6.4.1-beta.0 | 4.x |
|
38
|
+
| 8.10.2 | 5.x |
|
39
|
+
|
32
40
|
## Install
|
33
41
|
|
34
42
|
```bash
|
@@ -194,8 +202,6 @@ imports: [
|
|
194
202
|
|
195
203
|
### Toastr Service methods return:
|
196
204
|
|
197
|
-
Toastr Service will return undefined if prevent duplicates is enabled
|
198
|
-
|
199
205
|
```typescript
|
200
206
|
export interface ActiveToast {
|
201
207
|
/** Your Toast ID. Use this to close it individually */
|
@@ -356,6 +362,20 @@ ngOnInit() {
|
|
356
362
|
https://github.com/scttcper/ngx-toastr/issues/179
|
357
363
|
4. How can I translate messages See:
|
358
364
|
https://github.com/scttcper/ngx-toastr/issues/201
|
365
|
+
5. How to handle toastr click/tap action?
|
366
|
+
|
367
|
+
```ts
|
368
|
+
showToaster() {
|
369
|
+
this.toastr.success('Hello world!', 'Toastr fun!')
|
370
|
+
.onTap
|
371
|
+
.pipe(take(1))
|
372
|
+
.subscribe(() => this.toasterClickedHandler());
|
373
|
+
}
|
374
|
+
|
375
|
+
toasterClickedHandler() {
|
376
|
+
console.log('Toastr clicked');
|
377
|
+
}
|
378
|
+
```
|
359
379
|
|
360
380
|
## Previous Works
|
361
381
|
|