Skip to content

Glossary: Angular Beyond the Basics

inject()

Also written: inject

A function that gets a service Angular provides, such as `inject(HttpClient)`. It works in field initializers, constructors and guard or interceptor functions.

Where the book teaches it

Related terms

Injection context@Service()