question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

issues running ngx-toastr in Server Side Render

See original GitHub issue

Hello, first of all, congratulations for your excellent work developing ngx-toastr. The problem that I come to report is when I use the ngx-toastr module with Angularfire and Universal. I made my application in Angular 6, I followed your instructions for installation and use. Everything works perfectly when I try the application with ng serve. In the same way, everything works well with the application when I run ng build --prod. But my problem comes when I follow the steps to achieve the server side render with Angularfire and Universal. I follow the steps described in: https://github.com/angular/angularfire2/blob/dfaaac880d2829a893d471a2ee3811b79fcfaff3/docs/universal/getting-started.md I get the application compile and run without errors BUT THE BEHAVIOR OF ngx-toastr RUNNING ON THE SERVER IS UNEXPECTED. The first thing I saw is that the animations do not work in the same way as when I run the angular server with ng serve; but that is not important, that can be ignored; But WHAT I SEE AS ​​A PROBLEM IS THAT SOME TOAST DOES NOT DISMISS BYPASSING THE TIMEOUT, NEITHER DISMISS WITH TAP ON THE TOAST TO DISMISS.

I have prepared a repository so that you can verify what I say: https://github.com/IngAjVillalon/Angular-Universal-6-Server-Side-Render The steps you must follow are: Clone this repository npm install npm run build && npm run serve: ssr

You can see what I mentioned earlier.

Could you please help me to make ngx-toastr run well on the server side?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:7
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

5reactions
scttcpercommented, Sep 8, 2018

Thanks for the repo and i’ll try to take a deeper look at it soon to see if we can do anything. I would avoid drawing toasts during route changes or on application init. You might also try number 1 in the FAQ https://github.com/scttcper/ngx-toastr#faq

3reactions
trevor-hackettcommented, Sep 9, 2018

What happens if you set onActivateTick to true when displaying the toasts from the server?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular server side rendering issue [Zone already loaded]
I am able to build app for server side rendering but when i run server.ts file i get this error. Commands: "build:ssr": "npm...
Read more >
How to Create Angular Toastr Notifications - JScrambler Blog
In this tutorial, you'll learn how to unleash the power of Toastr to display notifications in your Angular web application.
Read more >
ngx-toastr - npm
Start using ngx-toastr in your project by running `npm i ngx-toastr`. There are 305 other projects in the npm registry using ngx-toastr.
Read more >
How to Create Angular Toastr Notifications - Morioh
ngx -toastr provides a number of options to customize the toast notification. You can control how you want the toast notification to render....
Read more >
Implementing multi-language Angular applications rendered ...
Then we will enable Server-Side Rendering (SSR) and solve issues ... Using ngx-translate will allow us to store our strings in separate JSON...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found