Skip to content

Commit

Permalink
fix(platform): add support in @analogjs/platform for older Angular ve…
Browse files Browse the repository at this point in the history
…rsions (#1088)
  • Loading branch information
brandonroberts committed May 13, 2024
1 parent 341d8e4 commit f9dc0ff
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
6 changes: 3 additions & 3 deletions apps/docs-app/docs/guides/compatibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ The table shows the minimum version of Nx, the supported Angular version, and th
| ------------------ | --------------- | -------------- | ------------ |
| 18.0.0 | ^17.0.0 | **latest** | ^5.0.0 |
| 17.0.0 | ^17.0.0 | **latest** | ^5.0.0 |
| 16.1.0 | ^16.1.0 | **~1.1.0** | ^5.0.0 |
| 16.0.0 | ~15.2.X | **~1.1.0** | ^5.0.0 |
| 15.2.0 | ~15.2.X | **~1.1.0** | ^5.0.0 |
| 16.1.0 | ^16.1.0 | **latest** | ^5.0.0 |
| 16.0.0 | ~15.2.X | **latest** | ^5.0.0 |
| 15.2.0 | ~15.2.X | **latest** | ^5.0.0 |

Additionally, you can check this [guide from Nx](https://nx.dev/packages/angular/documents/angular-nx-version-matrix)
to learn more about Nx and Angular compatibility.
2 changes: 2 additions & 0 deletions apps/docs-app/docs/guides/migrating.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import TabItem from '@theme/TabItem';

An existing Angular Single Page Application can be configured to use Analog using a schematic/generator for Angular CLI or Nx workspaces.

> Analog is compatible with Angular v15 and above.
## Using a Schematic/Generator

First, install the `@analogjs/platform` package:
Expand Down
5 changes: 4 additions & 1 deletion packages/platform/src/lib/router-plugin.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { VERSION } from '@angular/compiler-cli';
import { normalizePath, Plugin } from 'vite';

/**
Expand Down Expand Up @@ -36,7 +37,9 @@ export function routerPlugin(): Plugin[] {
include: [
'@angular/common',
'@angular/common/http',
'@angular/core/rxjs-interop',
...(Number(VERSION.major) > 15
? ['@angular/core/rxjs-interop']
: []),
],
exclude: ['@angular/platform-server', '@analogjs/router'],
},
Expand Down

0 comments on commit f9dc0ff

Please sign in to comment.