Angular · Junior · Question 62 of 75
What must be registered to inject HttpClient in a standalone app?
bootstrapApplication(App, {
providers: [provideHttpClient()],
});- ✓Correct answer:
provideHttpClient()in the application providers - 2Nothing - it's always available
- 3
HttpClientModulein every component'simports
Explanation
Features like interceptors or the fetch backend are added as arguments: provideHttpClient(withInterceptors([...]), withFetch()).