Skip to content

Commit

Permalink
docs: scope
Browse files Browse the repository at this point in the history
  • Loading branch information
zhennann committed Oct 3, 2024
1 parent 6507808 commit bd69b0a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions zova-docs/guide/essentials/scope/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,7 @@ export class TestA {
- Type of `Scope` object imported from module `home-base`
- Use the `UseScope` decorator function
- The system will automatically find the `Scope` instance of the module `home-base` and inject it into the variable `$$scopeModuleHomeBase`

::: info
Based on the support of the compiler, UseScope will automatically switch to asynchronous loading mode. Specifically, the system will asynchronously load the module `home-base`, then obtain the Scope instance of the module, and then inject it
:::
4 changes: 4 additions & 0 deletions zova-docs/zh/guide/essentials/scope/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,7 @@ export class TestA {
- 导入模块`home-base``Scope`对象的类型
- 使用`UseScope`装饰器函数
- 系统会自动找到模块`home-base``Scope`实例,并且注入给变量`$$scopeModuleHomeBase`

::: info
基于编译器的加持,UseScope 会自动转为异步加载模式,具体而言就是:系统会异步加载模块`home-base`,然后取得 home-base 的 Scope 实例,从而完成注入
:::

0 comments on commit bd69b0a

Please sign in to comment.