SAP Spartacus中使用到的Angular ModuleWithProviders类型

时间:2022-07-24
本文章向大家介绍SAP Spartacus中使用到的Angular ModuleWithProviders类型,主要内容包括其使用实例、应用技巧、基本知识点总结和需要注意事项,具有一定的参考价值,需要的朋友可以参考一下。

WithConfig的返回值:

定义在Angular core的数据结构里:

type的定义:

 * Represents a type that a Component or other object is instances of.
 *
 * An example of a `Type` is `MyCustomComponent` class, which in JavaScript is be represented by
 * the `MyCustomComponent` constructor function.

Type的类型是FunctionConstructor:

FunctionConstructor的定义,和JavaScript里的Function构造器类似:

Provider类型: