mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2026-09-09 18:02:54 +00:00
[ADF-5183] Upgrade to Angular 10 (#1506)
* upgrade preparation fixes
* remove fdescribe
* update browserlist config
* ng8
* ngrx 8
* ng9
* ngrx 9
* remove entryComponents
* unit tests
* ng 10
* latest ADF
* fix unit tests
* fix lint
* update deps and travis
* code fixes
* upgrade webdriver
* cleanup libs
* fix test
* update test
* Use browserTarget as target for lite-serve
* Use the update webdriver with CI condition
* Use version console.log('load', path
* Fix path sh
* Try to use remote env
* Add the . to export variabled
* Use hardcoded chrome version
* Remove the run remote
* Avoid to use the escape
* Skip flaky e2e and raise issue ACA-3615
* SKip failing e2e
* Skip flaky e2e and raise issue ACA-3615
* Fix close app toolbar menu and preconditions + tests of mark-favorite.test.ts Personal Files section
* Fix mark-favorite tests
* Fix ext-header test
* Fix new-menu tests
* Fix lint
* no message
* Fix viewer tests
Co-authored-by: maurizio vitale <maurizio.vitale@alfresco.com>
Co-authored-by: Cristina Jalba <cristina.jalba@ness.com>
This commit is contained in:
co-authored by
maurizio vitale
Cristina Jalba
parent
4ac1b8d7dd
commit
2854c17cd9
@@ -54,7 +54,6 @@ import { EXTENSION_DATA_LOADERS } from '@alfresco/aca-shared';
|
||||
@NgModule({
|
||||
imports: [...],
|
||||
declarations: [...],
|
||||
entryComponents: [...],
|
||||
providers: [
|
||||
...
|
||||
{
|
||||
|
||||
@@ -39,18 +39,6 @@ Angular CLI automatically configures Typescript path mappings for the project, s
|
||||
|
||||
### Register dynamic components
|
||||
|
||||
Update `my-extension.module.ts` and put all the content you plan to use at runtime dynamically to the `entryComponents` section of the module.
|
||||
|
||||
```typescript
|
||||
@NgModule({
|
||||
imports: [],
|
||||
declarations: [MyExtensionComponent],
|
||||
exports: [MyExtensionComponent],
|
||||
entryComponents: [MyExtensionComponent]
|
||||
})
|
||||
export class MyExtensionModule {}
|
||||
```
|
||||
|
||||
Now we need to register `MyExtensionComponent` as an extension component.
|
||||
Update the code as in the next example:
|
||||
|
||||
|
||||
@@ -18,8 +18,7 @@ import { ExtensionsModule, ExtensionService } from '@alfresco/adf-extensions';
|
||||
|
||||
@NgModule({
|
||||
imports: [ ExtensionsModule ]
|
||||
declarations: [ MyComponent1, MyLayout ],
|
||||
entryComponents: [ MyComponent1, MyLayout ]
|
||||
declarations: [ MyComponent1, MyLayout ]
|
||||
})
|
||||
export class MyExtensionModule {
|
||||
|
||||
@@ -42,8 +41,5 @@ export class MyExtensionModule {
|
||||
}
|
||||
```
|
||||
|
||||
**Note:** According to Angular rules, all components that are created dynamically at runtime
|
||||
need to be registered within the `entryComponents` section of the NgModule.
|
||||
|
||||
The Registration API is not limited to the custom content only.
|
||||
You can replace any existing entries by replacing the values from your module.
|
||||
|
||||
@@ -139,24 +139,6 @@ Please read more details on Dialog components here: [Dialog Overview](https://ma
|
||||
ng g component dialogs/my-extension-dialog --module=app
|
||||
```
|
||||
|
||||
According to Angular rules, the component needs to also be registered within the `entryComponents` section of the module.
|
||||
|
||||
Update the `src/app/app.module.ts` file according to the example below:
|
||||
|
||||
```ts
|
||||
@NgModule({
|
||||
imports: [...],
|
||||
declarations: [
|
||||
...,
|
||||
MyExtensionDialogComponent
|
||||
],
|
||||
entryComponents: [
|
||||
...,
|
||||
MyExtensionDialogComponent
|
||||
]
|
||||
})
|
||||
```
|
||||
|
||||
Update `my-extension-dialog.component.ts`:
|
||||
|
||||
```ts
|
||||
|
||||
Reference in New Issue
Block a user