# inject()

*noun*

say it: **“in-JEKT”** **/ɪnˈdʒɛkt/**

The Angular function a class calls to ask for a service.

## What does `inject()` do?

`inject()` is the function that asks Angular's dependency injection for a service. It is the modern alternative to constructor parameters.

```typescript
export class Profile {
  private http = inject(HttpClient);
  private route = inject(ActivatedRoute);
}
```

## In a sentence

- “calculator = **inject**(PriceCalculator) gives the component the shared calculator.”

Level: Apprentice · [More Angular terms at this level](https://www.ask-codey.com/glossary?category=angular&level=2)

Updated: November 9, 2026

Source: https://www.ask-codey.com/glossary/inject
