# ngOnInit

*noun*

say it: **“EN-JEE on ih-NIT”** **/ˌɛn ˈdʒiː ɒn ɪˈnɪt/**

The Angular lifecycle method that runs once when a component is ready, often used to load data.

## What does `ngOnInit` do?

`ngOnInit` runs once, after Angular has set up the component and its inputs. It is the usual place to start loading data.

```typescript
export class OrderHistory implements OnInit {
  ngOnInit() {
    this.loadOrders();
  }
}
```

## In a sentence

- “The product list loads its data in **ngOnInit**.”

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/ngoninit
