0

With angular 7 universal, I'm run on client server with command:

npm run build:ssr && npm run serve:ssr

I have homepage with list products and product-detail with paramn getting from homepage.

In homepage.ts, to redirect to product-detail, I'm using:

this.router.navigate(['/product-detail', id]);

On brower, the url like: http://localhost:4000/product-detail/1

And product-detail page still loading But when I refresh page or access with url on brower, it not working.

I'm don't know how to fix that. Anyone can help? Please.

11
  • Any error in the console server side? Or client side? Commented May 27, 2019 at 9:38
  • Hi David. I try to add console.log('Check flow') in product-detail.component.ts - In case : this.router.navigate(['/product-detail', id]); - It log in cosole of browser.But in case access in url brower, It show in console terminal of visual code. Commented May 27, 2019 at 10:18
  • But in the console where you run npm run serve:ssr, you have no errors? Commented May 27, 2019 at 12:03
  • It work fine, hard to know it Commented May 27, 2019 at 12:48
  • @David I add console.log(errs) after call API has errors "Error: The XMLHttpRequest compatibility library was not found. - code: 'auth/internal-error' - message: 'The XMLHttpRequest compatibility library was not found.' " Commented May 27, 2019 at 14:21

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.