mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2026-09-09 18:02:54 +00:00
Add Japanese document (#1186)
* Fixed invalid url link. * Update docs/features/side-navigation.md Co-Authored-By: Suzana Dirla <dirla.silvia.suzana@gmail.com> * Initial japanese translation.
This commit is contained in:
committed by
Suzana Dirla
co-authored by
Suzana Dirla
parent
21ffcaf013
commit
d67f95cfff
@@ -0,0 +1,49 @@
|
||||
---
|
||||
Title: 登録
|
||||
---
|
||||
|
||||
# 登録
|
||||
|
||||
`ExtensionService` を使用して、カスタムコンポーネント、認証ガード、
|
||||
ルールエバリュエータなどを登録できます。
|
||||
|
||||
モジュールコンストラクタ内からカスタムコンテンツを登録することをお勧めします。
|
||||
その場合、すべてのプラグインはメインアプリケーションコンポーネントの準備ができた直後に利用可能になります。
|
||||
|
||||
メインアプリケーションモジュール `app.module.ts` を更新するか、
|
||||
独自のモジュールを作成し、次のスニペットを使用してカスタムコンテンツを登録します:
|
||||
|
||||
```ts
|
||||
import { ExtensionsModule, ExtensionService } from '@alfresco/adf-extensions';
|
||||
|
||||
@NgModule({
|
||||
imports: [ ExtensionsModule ]
|
||||
declarations: [ MyComponent1, MyLayout ],
|
||||
entryComponents: [ MyComponent1, MyLayout ]
|
||||
})
|
||||
export class MyExtensionModule {
|
||||
|
||||
constructor(extensions: ExtensionService) {
|
||||
extensions.setComponents({
|
||||
'plugin1.components.my': MyComponent1,
|
||||
'plugin1.layouts.my': MyLayout
|
||||
});
|
||||
|
||||
extensions.setAuthGuards({
|
||||
'plugin.auth': MyAuthGuard
|
||||
});
|
||||
|
||||
extensions.setEvaluators({
|
||||
'plugin1.rules.custom1': MyCustom1Evaluator,
|
||||
'plugin1.rules.custom2': MyCustom2Evaluator
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
```
|
||||
|
||||
**注:** Angular のルールによれば、実行時に動的に作成されるすべてのコンポーネントは、
|
||||
NgModule の `entryComponents` セクション内に登録する必要があります。
|
||||
|
||||
Registration API は、カスタムコンテンツのみに限定されません。
|
||||
モジュールの値を置き換えることにより、既存のエントリを置き換えることができます。
|
||||
Reference in New Issue
Block a user