Skip to content

Commit 04193bb

Browse files
docs: update content to angualr 19 (#1250)
1 parent cf8179b commit 04193bb

File tree

2 files changed

+35
-10
lines changed

2 files changed

+35
-10
lines changed

documents/src/pages/build-app/compatibility.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@ Information below shows compatibility when using v7 with some popular frameworks
1818
| | 17 | 2021 | Not specified | Not specified | ![](/resources/images/green-tick.png) |
1919
| | 16 | 2018 | Not specified | Not specified | ![](/resources/images/green-tick.png) |
2020
| | 15<sup>*</sup> | 2016 | `<=16` | Not specified | ![](/resources/images/amber-tick.png) |
21-
| Angular | 16 | 2023 | `^16.14.0` or `^18.10.0` | `>= 4.9.3` < `5.2.0` | ![](/resources/images/green-tick.png) |
21+
| Angular | 19 | 2024 | `^18.19.1` or `^20.11.1` or `^22.0.0` | `>= 5.5.0` < `5.7.0` | ![](/resources/images/green-tick.png) |
22+
| | 18 | 2024 | `^18.19.1` or `^20.11.1` or `^22.0.0` | `>= 5.4.0` < `5.6.0` | ![](/resources/images/green-tick.png) |
23+
| | 17 | 2023 | `^18.13.0` or `^20.9.0` | `>= 5.2.0` < `5.5.0` | ![](/resources/images/green-tick.png) |
24+
| | 16 | 2023 | `^16.14.0` or `^18.10.0` | `>= 4.9.3` < `5.2.0` | ![](/resources/images/green-tick.png) |
2225
| | 15 | 2022 | `^14.20.0` or `^16.13.0` or `^18.10.0` | `>= 4.8.2` < `5.0.0` | ![](/resources/images/green-tick.png) |
2326
| | 14 | 2022 | `^14.15.0` or `^16.10.0` | `>= 4.6.2` < `4.9.0` | ![](/resources/images/green-tick.png) |
2427
| | 13 | 2022 | `^12.20.0` or `^14.15.0` or `^16.10.0` | `>= 4.4.3` < `4.7.0` | ![](/resources/images/green-tick.png) |
@@ -44,7 +47,7 @@ Information below shows compatibility when using v7 with some popular frameworks
4447

4548
## References
4649

47-
* [Angular versioning and releases](https://angular.io/guide/releases)
50+
* [Angular versioning and releases](https://angular.dev/reference/versions)
4851
* [EOL and support information for Angular](https://endoflife.date/angular)
4952
* [EOL and support information for React](https://endoflife.date/react)
5053

documents/src/pages/build-app/framework-integration/angular.md

Lines changed: 30 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,34 @@ layout: default
1212
# Angular Guide
1313

1414
## Try online demo
15-
A playground project that uses Element Framework with Angular. Here is a [link](https://codesandbox.io/p/devbox/angular-16-forms-ef-v7-gghflk).
15+
A playground project that uses Element Framework with Angular. Here is a [link](https://codesandbox.io/p/devbox/angular-19-forms-ef-v7-k99zdv).
1616

1717
## Using web components in Angular
18+
@>This guideline uses project generated from [Angular CLI](https://github.com/angular/angular-cli) version 19.0.05.
1819

19-
@>This guideline uses project generated from [Angular CLI](https://github.com/angular/angular-cli) version 16.2.10.
20+
### Standlone
21+
Since Angular 17, the default project setup is a Standalone based component. To use Web component, have to import `CUSTOM_ELEMENTS_SCHEMA` from `@angular/core` and inject it into the `schemas` property of `@Component` decorator. This property will allow non-Angular elements named with dash case like web components to be used in Angular's template. The approach need to inject in every components that use web component.
2022

21-
Import `CUSTOM_ELEMENTS_SCHEMA` from `@angular/core` and inject it into the `schemas` property of our AppModule definition. This property will allow non-Angular elements named with dash case like web components to be used in Angular's template.
23+
Make the following changes to `./src/app/app.component.ts`.
24+
25+
```diff
26+
-import { Component } from '@angular/core';
27+
+import { Component, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
28+
import { Component } from '@angular/core';
29+
30+
@Component({
31+
selector: 'app-root',
32+
templateUrl: './app.component.html',
33+
styleUrl: './app.component.css',
34+
+ schemas: [CUSTOM_ELEMENTS_SCHEMA]
35+
})
36+
export class AppComponent {
37+
...
38+
}
39+
```
40+
41+
### Module base
42+
In other way if you are a module-based application, you can enable to use web component by importing `CUSTOM_ELEMENTS_SCHEMA` from `@angular/core` and inject it into the `schemas` property of our AppModule definition.
2243

2344
Make the following changes to `./src/app/app.module.ts`.
2445

@@ -27,18 +48,19 @@ Make the following changes to `./src/app/app.module.ts`.
2748
+import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
2849
import { BrowserModule } from '@angular/platform-browser';
2950

51+
import { AppRoutingModule } from './app-routing.module';
3052
import { AppComponent } from './app.component';
3153

3254
@NgModule({
3355
declarations: [
3456
AppComponent
3557
],
3658
imports: [
37-
BrowserModule
59+
BrowserModule,
60+
AppRoutingModule
3861
],
3962
providers: [],
40-
- bootstrap: [AppComponent]
41-
+ bootstrap: [AppComponent],
63+
bootstrap: [AppComponent],
4264
+ schemas: [CUSTOM_ELEMENTS_SCHEMA]
4365
})
4466

@@ -47,9 +69,9 @@ Make the following changes to `./src/app/app.module.ts`.
4769

4870
## Using EF with Angular's form
4971

50-
To utilise full capabilities of Angular's powerful [ReactiveForms](https://angular.io/guide/reactive-forms) with web components, we need to use [ControlValueAccessor](https://angular.io/api/forms/ControlValueAccessor) directive which acts as a bridge that synchronizes the data between element and Forms API.
72+
To utilise full capabilities of Angular's powerful [ReactiveForms](https://angular.dev/guide/forms/reactive-forms) with web components, we need to use [ControlValueAccessor](https://angular.dev/api/forms/ControlValueAccessor) directive which acts as a bridge that synchronizes the data between element and Forms API.
5173

52-
In most cases, for elements such as `ef-text-field`, `ef-search-field` and `ef-number-field>` that has similar behavior to native `input[type=text]`, you can use [DefaultValueAccessor](https://angular.io/api/forms/DefaultValueAccessor) directive `ngDefaultControl`.
74+
In most cases, for elements such as `ef-text-field`, `ef-search-field` and `ef-number-field>` that has similar behavior to native `input[type=text]`, you can use [DefaultValueAccessor](https://angular.dev/api/forms/DefaultValueAccessor) directive `ngDefaultControl`.
5375

5476
```html
5577
<ef-text-field formControlName="..." ngDefaultControl>

0 commit comments

Comments
 (0)