Angular · Junior · Question 62 of 75

What must be registered to inject HttpClient in a standalone app?

bootstrapApplication(App, {
  providers: [provideHttpClient()],
});

Explanation

Features like interceptors or the fetch backend are added as arguments: provideHttpClient(withInterceptors([...]), withFetch()).

Further reading

Problem with a question

Angular · Junior · question 62

Test yourself

Take the Angular · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz