r/angular • u/LogmonLG • May 04 '20
Angular Animated Notifications
https://youtu.be/oy4XA8_wJGg1
u/comp_freak May 04 '20
Interesting, I am learning angular course and the authors shows use of interceptor and toaster to show notifications for API errors.
2
u/williewodka May 04 '20
I also did this and while its neat that every response gets a toast it can also be annoying. If you need to do a batch of operations like creating an order, attach different products with individual payloads. It gets a bit annoying to always see the success growl spam.
1
u/comp_freak May 04 '20
We only did for "error-interceptors" not for success ones.
1
u/williewodka May 04 '20
If something fails that can still get pretty spammy
2
u/comp_freak May 05 '20
The instructor did ask to set prevent-duplicate to true. I am still learning so I don't hold any strong opinion about it.
ToastrModule.forRoot({ positionClass: 'toast-bottom-right', preventDuplicates: true })
1
u/techyrajput May 04 '20
I have a learned this topic very well by watching your video. Thanks for sharing such a knowledgable content.
1
u/ihavenofriggenidea May 04 '20
Neat, I just recreated what I had built in AngularJS, but this would have saved me a bunch of time.