Angular Universal App reload the content twice for the initial code, how to prevent this?
I have put my initial code in ngOnInit() still getting the same result.
Angular Universal App reload the content twice for the initial code, how to prevent this?
I have put my initial code in ngOnInit() still getting the same result.
Angular Universal first prerenders the js of your project in server side and then once the dom is rendered it switches to the client side, irrespective of the data fetched. Make sure you don't call the data or APIs again once you get it. This should help to stop the second reload.