mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-24 17:31:52 +00:00
update extension registration docs
This commit is contained in:
@@ -1,6 +1,3 @@
|
|||||||
---
|
|
||||||
---
|
|
||||||
|
|
||||||
# Registration
|
# Registration
|
||||||
|
|
||||||
You can use `ExtensionService` to register custom components, authentication guards,
|
You can use `ExtensionService` to register custom components, authentication guards,
|
||||||
@@ -16,7 +13,7 @@ and use the following snippet to register custom content:
|
|||||||
import { ExtensionsModule, ExtensionService } from '@alfresco/adf-extensions';
|
import { ExtensionsModule, ExtensionService } from '@alfresco/adf-extensions';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [ ExtensionsModule.forChild() ]
|
imports: [ ExtensionsModule ]
|
||||||
declarations: [ MyComponent1, MyLayout ],
|
declarations: [ MyComponent1, MyLayout ],
|
||||||
entryComponents: [ MyComponent1, MyLayout ]
|
entryComponents: [ MyComponent1, MyLayout ]
|
||||||
})
|
})
|
||||||
@@ -41,9 +38,6 @@ export class MyExtensionModule {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Use `ExtensionsModule.forChild()` when importing into the child modules,
|
|
||||||
and `ExtensionsModule.forRoot()` for the main application module.
|
|
||||||
|
|
||||||
<p class="warning">
|
<p class="warning">
|
||||||
According to Angular rules, all components that are created dynamically at runtime
|
According to Angular rules, all components that are created dynamically at runtime
|
||||||
need to be registered within the `entryComponents` section of the NgModule.
|
need to be registered within the `entryComponents` section of the NgModule.
|
||||||
|
Reference in New Issue
Block a user