> ## Documentation Index
> Fetch the complete documentation index at: https://docs.depfixer.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Angular Migration Guide

> Step-by-step guide to upgrading Angular versions

# Angular Migration Guide

This guide walks you through upgrading your Angular application using DepFixer.

## Supported Migrations

| Current Version | Target Versions    |
| --------------- | ------------------ |
| Angular 12      | 15, 16, 17, 18, 19 |
| Angular 13      | 16, 17, 18, 19     |
| Angular 14      | 17, 18, 19         |
| Angular 15      | 18, 19             |
| Angular 16      | 18, 19             |
| Angular 17      | 18, 19             |
| Angular 18      | 19                 |

DepFixer supports multi-version jumps. You can go directly from Angular 12 to Angular 18.

## Before You Start

### 1. Check Current State

```bash theme={null}
npx depfixer
```

Fix any existing issues before migrating. A clean health score makes migration smoother.

### 2. Commit Current Changes

```bash theme={null}
git add -A
git commit -m "chore: pre-migration checkpoint"
```

## Migration Steps

### Step 1: Run Migration Command

```bash theme={null}
npx depfixer migrate
```

### Step 2: Select Target Version

Use arrow keys to navigate and Enter to select:

```
Select target version:

    Angular 19 (Latest)
      -> 19.0.0 - Latest stable

  > Angular 18 (LTS)
      -> 18.2.0 - Long-term support

    Angular 17
      -> 17.3.0 - Stable
```

### Step 3: Review and Apply

After payment, the migration is applied:

```
✨ SUCCESS
──────────────────────────────────────────────────

    ✓ 12 Packages Updated
    ✓ Backup: package.json.bak

    👉 NEXT STEP:
    Run the following command to finalize changes:

    $ npm install
```

## Post-Migration Steps

### 1. Install Dependencies

```bash theme={null}
npm install
```

### 2. Run Angular Schematics (Optional)

Some migrations require code changes:

```bash theme={null}
ng update @angular/core @angular/cli
```

### 3. Fix Any Remaining Issues

```bash theme={null}
npx depfixer
ng build
```

## TypeScript Versions

| Angular | TypeScript |
| ------- | ---------- |
| 19      | 5.5 - 5.6  |
| 18      | 5.4 - 5.5  |
| 17      | 5.2 - 5.4  |
| 16      | 4.9 - 5.1  |
| 15      | 4.8 - 4.9  |

## Version-Specific Changes

### Angular 16 → 17

* **Standalone by default** - Components are standalone unless specified
* **New control flow** - `@if`, `@for`, `@switch` syntax
* **Deferred loading** - `@defer` for lazy loading

### Angular 17 → 18

* **Zoneless support** - Experimental zoneless change detection
* **Signal-based inputs** - `input()` function for reactive inputs
* **New build system** - `application` builder with esbuild

### Angular 18 → 19

* **Incremental hydration** - Partial hydration for SSR
* **Resource API** - Reactive data fetching primitives
* **linkedSignal** - Derived signals with reset capability

## Rollback

If migration fails, restore from backup:

```bash theme={null}
# Restore package.json
copy package.json.bak package.json  # Windows
cp package.json.bak package.json    # macOS/Linux

# Reinstall original dependencies
npm install
```
