stanleyeosakul/mean-starter-kit

Server-side rendering is not working when i call api to express

Opened this issue · 0 comments

In app.component.ts I have code
ngOnInit() { this.http.get<any>('https://jsonplaceholder.typicode.com/users').subscribe(result => { this.resultFromJPH = result; }); this.http.get<any>('api/helloFromExpress').subscribe(result => { this.resultFromExpress = result; }); }
All well, but I show on Network tab the only resultFromJPH is server-side rendered but resultFromExpress not, it will binding data before my page load. How do I resolve it?