Reputation: 363
I'm implementing Angular Universal over an Angular project to hide some http requests, but in my research, I found that I can't hide those with the way provided by Angular. Did someone try to do the http request in the express engine an retrieve the data?
The target is a very large Angular 5 project (I know.. If I wanted to do the http requests from the server, I wouldn't use Angular but I didn't begin the project)
I applied the configuration recommended by Angular in this article: https://angular.io/guide/universal
I want to hide some requests from the client
Upvotes: 0
Views: 2589
Reputation: 8294
You can make the HTTP calls server side and then send that state through with your page using the TransferHTTP library.
Upvotes: 0
Reputation: 34445
You cannot. Only initial page will be rendered using angular universal; once that page is loaded the client side angular application takes over and then you've got SPA navigation, with ajax calls to your API.
Upvotes: 2