Display toastr after http post request does not work
See original GitHub issueHello,
I’d like display an green toastr in case of success and a red in case of error after an http post request.
It’s strange because when I put the code
this.toastrService.success('Hello world!', 'Toastr fun!');
in ngOnInit
I see the toastr
I see the ‘OK’ in the console, the line just before the call to toastrService
.
Here the link to the code https://pastebin.com/SQxXxvU5
What’s wrong ?
Thanks,
Issue Analytics
- State:
- Created 5 years ago
- Comments:14 (2 by maintainers)
Top Results From Across the Web
Display message in a toastr after controller method finish
In your http post action method, after successful upload, set an entry to TempData dictionary and read it in the next view which...
Read more >Handling HTTP Error Messages Globally using Interceptors ...
Handle all HTTP error messages in your whole Angular app using Interceptors and NGX-Toaster. What are Interceptors?
Read more >Handling HTTP Error Messages `Globally` using Interceptors ...
Handle all HTTP error messages in your whole Angular app using Interceptors and NGX-Toaster. What are Interceptors?
Read more >Handle http responses with HttpInterceptor and Toastr in ...
In this article I will show you how to deal with it, by using an http interceptor and the ngx-toastr plugin to display...
Read more >How to flash Toastr error message if validation fails when ...
'Changes has been saved'); return back(); I got no place to post error ... <?php namespace App\Http\Requests; use Illuminate\Foundation\Http\FormRequest; ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Kris-I the example above is based on angular project with RXJS. You can get more information here: https://angular.io/guide/rx-library
But if you are creating a simple project just need to use :
Don’t forget to provide in the constructor
@yarrgh @scttcper This issue can be closed.
Nevermind. Figured out the animation error. StackBlitz pulled in
@angular/animations
6.1 while the rest of@angular
was on 6.0.0