# Resolver

A function that loads data before a route opens.

## What is **Resolver**?

A **resolver** loads data before a route opens, so the component starts with its data ready.

```typescript
export const recipeResolver: ResolveFn<Recipe> = route =>
  inject(RecipeService).get(route.paramMap.get('id')!);

{ path: 'recipes/:id', component: RecipeDetail, resolve: { recipe: recipeResolver } }
```

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

Updated: September 27, 2026

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