填写这份《一分钟调查》,帮我们(开发组)做得更好!去填写Home

InjectFlags

DI 的注入标志。

Injection flags for DI.

      
      enum InjectFlags {
  Default: 0b0000
  Host: 0b0001
  Self: 0b0010
  SkipSelf: 0b0100
  Optional: 0b1000
}
    

成员列表

成员说明
Default: 0b0000

检查自身并检查父注入器(如果需要)

Check self and check parent injector if needed

Host: 0b0001

指定注入器应从任何注入器中检索依赖项,直到到达当前组件的宿主元素为止。(仅与元素注入器一起使用)

Specifies that an injector should retrieve a dependency from any injector until reaching the host element of the current component. (Only used with Element Injector)

Self: 0b0010

不要上升到请求注入的节点的祖先去处理。

Don't ascend to ancestors of the node requesting injection.

SkipSelf: 0b0100

跳过请求注入的节点。

Skip the node that is requesting injection.

Optional: 0b1000

如果找不到令牌,则注入 defaultValue

Inject defaultValue instead if token not found.