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

@angular/core

Implements Angular's core functionality, low-level services, and utilities.

  • Defines the class infrastructure for components, view hierarchies, change detection, rendering, and event handling.

  • Defines the decorators that supply metadata and context for Angular constructs.

  • Defines infrastructure for dependency injection (DI), internationalization (i18n), and various testing and debugging facilities.

入口点

Entry points

主要

Primary

@angular/core

Implements Angular's core functionality, low-level services, and utilities.

次要

Secondary

@angular/core/global

Exposes a set of functions in the global namespace which are useful for debugging the current state of your application. These functions are exposed via the global ng "namespace" variable automatically when you import from @angular/core and run your application in development mode. These functions are not exposed when the application runs in a production mode.

@angular/core/testing

Provides infrastructure for testing Angular core functionality.

主要入口点的导出

Primary entry point exports

NgModules

ApplicationModule

为应用配置根注入器,它带有 ApplicationRef 在引导组件时所需的来自 @angular/core 的提供者。

Configures the root injector for an app with providers of @angular/core dependencies that ApplicationRef needs to bootstrap components.

Classes

ApplicationInitStatus

反映正在运行的 APP_INITIALIZER函数状态的类。

A class that reflects the state of running APP_INITIALIZERfunctions.

ApplicationRef

对页面上运行的 Angular 应用程序的引用。

A reference to an Angular application running on a page.

Attribute

属性装饰器和元数据。

Attribute decorator and metadata.

ChangeDetectorRef

Angular 各种视图的基础类,提供变更检测功能。 变更检测树会收集要检查的所有视图。 使用这些方法从树中添加或移除视图、初始化变更检测并显式地把这些视图标记为脏的,意思是它们变了、需要重新渲染。

Base class that provides change detection functionality. A change-detection tree collects all views that are to be checked for changes. Use the methods to add and remove views from the tree, initiate change-detection, and explicitly mark views as dirty, meaning that they have changed and need to be re-rendered.

Compiler

本底层服务用于供 Angular 编译器在运行期间创建 ComponentFactory,该工厂以后可用于创建和渲染组件实例。

Low-level service for running the angular compiler during runtime to create ComponentFactorys, which can later be used to create and render a Component instance.

CompilerFactory

用于创建编译器的工厂

A factory for creating a Compiler

ComponentFactory

可用来动态创建组件的工厂的基类。resolveComponentFactory() 实例化给定类型的组件的工厂。使用生成的 ComponentFactory.create() 方法创建该类型的组件。

Base class for a factory that can create a component dynamically. Instantiate a factory for a given type of component with resolveComponentFactory(). Use the resulting ComponentFactory.create() method to create a component of that type.

ComponentFactoryResolver

一个简单的注册表,它将 Components 映射到生成的 ComponentFactory 类,该类可用于创建组件的实例。用于获取给定组件类型的工厂,然后使用工厂的 create() 方法创建该类型的组件。

A simple registry that maps Components to generated ComponentFactory classes that can be used to create instances of components. Use to obtain the factory for a given component type, then use the factory's create() method to create a component of that type.

ComponentRef

表示由 ComponentFactory 创建的组件。提供对组件实例和相关对象的访问,并提供销毁实例的方法。

Represents a component created by a ComponentFactory. Provides access to the component instance and related objects, and provides the means of destroying the instance.

DebugElement
DebugEventListener
DebugNode
DefaultIterableDiffer

已弃用: v4.0.0 - Should not be part of public API.

v4.0.0-不应成为公共 API 的一部分。

ElementRef

对视图中某个原生元素的包装器。

A wrapper around a native element inside of a View.

EmbeddedViewRef

表示视图容器中的 Angular 视图嵌入视图可以从在模板中定义它的宿主组件之外的组件中引用,也可以由 TemplateRef 进行独立定义。

Represents an Angular view in a view container. An embedded view can be referenced from a component other than the hosting component whose template defines it, or it can be defined independently by a TemplateRef.

ErrorHandler

提供用于集中式异常处理的挂钩。

Provides a hook for centralized exception handling.

EventEmitter

用在带有 @Output 指令的组件中,以同步或异步方式发出自定义事件,并通过订阅实例来为这些事件注册处理器。

Use in components with the @Output directive to emit custom events synchronously or asynchronously, and register handlers for those events by subscribing to an instance.

InjectionToken

创建可用于 DI 提供者的令牌。

Creates a token that can be used in a DI Provider.

Injector

具体的注入器会实现此接口。配置有某些提供者的注入器,这些提供者会将各种类型的依赖项与注入令牌相关联。

Concrete injectors implement this interface. Injectors are configured with providers that associate dependencies of various types with injection tokens.

IterableDiffers

NgFor、NgClass 等使用的不同迭代策略的存储库。

A repository of different iterable diffing strategies used by NgFor, NgClass, and others.

KeyValueDiffers

NgClass、NgStyle 等使用的不同映射表差异策略的存储库。

A repository of different Map diffing strategies used by NgClass, NgStyle, and others.

ModuleWithComponentFactories

NgModuleFactory 和一些 ComponentFactory 的组合。

Combination of NgModuleFactory and ComponentFactories.

NgModuleFactory
NgModuleFactoryLoader

已弃用: the string form of loadChildren is deprecated, and NgModuleFactoryLoader is part of its implementation. See LoadChildren for more details.

不建议使用 loadChildrenstring 形式,NgModuleFactoryLoader 是其实现的一部分。欲知详情,请参见 LoadChildren

用来加载 ng 模块工厂。

Used to load ng module factories.

NgModuleRef

NgModule 创建的 NgModuleFactory 的实例。提供对 NgModule 实例和相关对象的访问。

Represents an instance of an NgModule created by an NgModuleFactory. Provides access to the NgModule instance and related objects.

NgProbeToken

本令牌可以在 NgProbe 中注册自己的第三方组件。

A token for third-party components that can register themselves with NgProbe.

NgZone

一种用于在 Angular Zone 内部或外部执行任务的可注入服务。

An injectable service for executing work inside or outside of the Angular zone.

PlatformRef

Angular 平台是 Angular 在网页上的入口点。每个页面只有一个平台。页面上运行的每个 Angular 应用程序所共有的服务(例如反射)都在其范围内绑定。当使用 PlatformBrowser 这样的平台工厂创建平台时,将隐式初始化此页面的平台;也可以通过调用 createPlatform() 函数来显式初始化此页面的平台。

The Angular platform is the entry point for Angular on a web page. Each page has exactly one platform. Services (such as reflection) which are common to every Angular application running on the page are bound in its scope. A page's platform is initialized implicitly when a platform is created using a platform factory such as PlatformBrowser, or explicitly by calling the createPlatform() function.

Query

查询元数据的基类。

Base class for query metadata.

QueryList

一个不可修改的条目列表,当应用状态变化时,Angular 会保证它是最新的。

An unmodifiable list of items that Angular keeps up to date when the state of the application changes.

ReflectiveInjector

已弃用: from v5 - slow and brings in a lot of code, Use Injector.create instead.

从 v5 开始 - 速度慢,并且引入了大量代码,请改用 Injector.create

一个 ReflectiveDependency 注入容器,用于实例化对象和解析依赖关系。

A ReflectiveDependency injection container used for instantiating objects and resolving dependencies.

ReflectiveKey

已弃用: No replacement

无替代品

用于从 ReflectiveInjector中检索项目的唯一对象。

A unique object used for retrieving items from the ReflectiveInjector.

Renderer2

扩展此基类以实现自定义渲染器。默认情况下,Angular 会把模板渲染成 DOM。 你可以使用自定义渲染器来拦截渲染类调用,或用于渲染一些非 DOM 的东西。

Extend this base class to implement custom rendering. By default, Angular renders a template into DOM. You can use custom rendering to intercept rendering calls, or to render to something other than DOM.

RendererFactory2

创建并初始化实现 Renderer2 基类的自定义渲染器。

Creates and initializes a custom renderer that implements the Renderer2 base class.

ResolvedReflectiveFactory

Provider 创建的工厂函数的内部解析表示形式。

An internal resolved representation of a factory function created by resolving Provider.

Sanitizer

视图使用消毒器来对潜在的危险值进行无害化处理。

Sanitizer is used by the views to sanitize potentially dangerous values.

SimpleChange

表示指令实例上单个属性从先前值到新值的基本变更对象。在 SimpleChanges对象中作为值传递给 ngOnChanges 挂钩。

Represents a basic change from a previous to a new value for a single property on a directive instance. Passed as a value in a SimpleChangesobject to the ngOnChanges hook.

SystemJsNgModuleLoader

已弃用: the string form of loadChildren is deprecated, and SystemJsNgModuleLoader is part of its implementation. See LoadChildren for more details.

string 的形式 loadChildren 已被弃用, SystemJsNgModuleLoader 是其实现的一部分。有关更多详细信息,请参见 LoadChildren

使用 SystemJS 加载 NgModuleFactory 的 NgModuleFactoryLoader

NgModuleFactoryLoader that uses SystemJS to load NgModuleFactory

SystemJsNgModuleLoaderConfig

已弃用: the string form of loadChildren is deprecated, and SystemJsNgModuleLoaderConfig is part of its implementation. See LoadChildren for more details.

不推荐使用 loadChildrenstring 形式 SystemJsNgModuleLoaderConfig 是其实现的一部分。有关更多详细信息,请参见 LoadChildren

SystemJsNgModuleLoader 的配置。令牌。

Configuration for SystemJsNgModuleLoader. token.

TemplateRef

表示一个内嵌模板,它可用于实例化内嵌的视图。 要想根据模板实例化内嵌的视图,请使用 ViewContainerRefcreateEmbeddedView() 方法。

Represents an embedded template that can be used to instantiate embedded views. To instantiate embedded views based on a template, use the ViewContainerRef method createEmbeddedView().

Testability

Testability 服务提供了可以从浏览器和诸如 Protractor 之类的服务访问的测试钩子。页面上每个自举的 Angular 应用程序都会有一个 Testability 实例。

The Testability service provides testing hooks that can be accessed from the browser. Each bootstrapped Angular application on the page will have an instance of Testability.

TestabilityRegistry

实例的全局注册表,用于特定元素。

A global registry of Testabilityinstances for specific elements.

Testability
Type

表示 Component 或其他对象的类型。

Represents a type that a Component or other object is instances of.

Version

表示 Angular 的版本

Represents the version of Angular

ViewContainerRef

表示可以将一个或多个视图附着到组件中的容器。

Represents a container where one or more views can be attached to a component.

ViewRef

表示一个 Angular 视图

Represents an Angular view.

WrappedValue

已弃用: from v10 stop using. (No replacement, deemed unnecessary.)

从 v10 开始停止使用。 (无替代品,没必要。)

表示 Pipe转换的值已经变化了 —— 即使其引用并没有变。

Indicates that the result of a Pipetransformation has changed even though the reference has not changed.

装饰器

Decorators

Component

一个装饰器,用于把某个类标记为 Angular 组件,并为它配置一些元数据,以决定该组件在运行期间该如何处理、实例化和使用。

Decorator that marks a class as an Angular component and provides configuration metadata that determines how the component should be processed, instantiated, and used at runtime.

ContentChild

用于配置内容查询的参数装饰器。

Parameter decorator that configures a content query.

ContentChildren

用于配置内容查询的参数装饰器。

Parameter decorator that configures a content query.

Directive

将类标记为 Angular 指令的装饰器。你可以定义自己的指令,以将自定义行为附加到 DOM 中的元素。

Decorator that marks a class as an Angular directive. You can define your own directives to attach custom behavior to elements in the DOM.

Host

类构造函数的视图提供者参数上的参数修饰器,用于指示 DI 框架通过检查子元素的注入器来解析视图,并在到达当前组件的宿主元素时停止。

Parameter decorator on a view-provider parameter of a class constructor that tells the DI framework to resolve the view by checking injectors of child elements, and stop when reaching the host element of the current component.

HostBinding

一个装饰器,用于把一个 DOM 属性标记为绑定到宿主的属性,并提供配置元数据。 Angular 在变更检测期间会自动检查宿主属性绑定,如果这个绑定变化了,它就会更新该指令所在的宿主元素。

Decorator that marks a DOM property as a host-binding property and supplies configuration metadata. Angular automatically checks host property bindings during change detection, and if a binding changes it updates the host element of the directive.

HostListener

一个装饰器,用于声明要监听的 DOM 事件,并提供在该事件发生时要运行的处理器方法。

Decorator that declares a DOM event to listen for, and provides a handler method to run when that event occurs.

Inject

类构造函数中依赖项参数上的参数装饰器,用于指定依赖项的自定义提供者。

Parameter decorator on a dependency parameter of a class constructor that specifies a custom provider of the dependency.

Injectable

标记性元数据,表示一个类可以由 Injector 进行创建。

Decorator that marks a class as available to be provided and injected as a dependency.

Input

一个装饰器,用来把某个类字段标记为输入属性,并提供配置元数据。 该输入属性会绑定到模板中的某个 DOM 属性。当变更检测时,Angular 会自动使用这个 DOM 属性的值来更新此数据属性。

Decorator that marks a class field as an input property and supplies configuration metadata. The input property is bound to a DOM property in the template. During change detection, Angular automatically updates the data property with the DOM property's value.

NgModule

把一个类标记为 NgModule,并提供配置元数据。

Decorator that marks a class as an NgModule and supplies configuration metadata.

Optional

用于构造函数参数的参数装饰器,将参数标记为可选依赖项。如果找不到依赖项,则 DI 框架提供 null。

Parameter decorator to be used on constructor parameters, which marks the parameter as being an optional dependency. The DI framework provides null if the dependency is not found.

Output

一个装饰器,用于把一个类字段标记为输出属性,并提供配置元数据。 凡是绑定到输出属性上的 DOM 属性,Angular 在变更检测期间都会自动进行更新。

Decorator that marks a class field as an output property and supplies configuration metadata. The DOM property bound to the output property is automatically updated during change detection.

Pipe

本装饰器用于将类标记为管道并提供配置元数据。

Decorator that marks a class as pipe and supplies configuration metadata.

Self

将在构造函数参数上使用参数装饰器,该装饰器告诉 DI 框架从本地注入器开始解析依赖项。

Parameter decorator to be used on constructor parameters, which tells the DI framework to start dependency resolution from the local injector.

SkipSelf

将在构造函数参数上使用的参数装饰器,该参数指示 DI 框架从父注入器启动依赖项解析。解析器在注入器层次结构中向上查找,因此不会检查本地注入器的提供者。

Parameter decorator to be used on constructor parameters, which tells the DI framework to start dependency resolution from the parent injector. Resolution works upward through the injector hierarchy, so the local injector is not checked for a provider.

ViewChild

属性装饰器,用于配置一个视图查询。 变更检测器会在视图的 DOM 中查找能匹配上该选择器的第一个元素或指令。 如果视图的 DOM 发生了变化,出现了匹配该选择器的新的子节点,该属性就会被更新。

Property decorator that configures a view query. The change detector looks for the first element or the directive matching the selector in the view DOM. If the view DOM changes, and a new child matches the selector, the property is updated.

ViewChildren

用于配置视图查询的参数装饰器。

Parameter decorator that configures a view query.

函数

Functions

asNativeElements
assertPlatform

检查当前是否存在以给定令牌为提供者的平台。

Checks that there is currently a platform that contains the given token as a provider.

createPlatform

创建一个平台。必须使用此函数在启动时创建平台。

Creates a platform. Platforms must be created on launch using this function.

createPlatformFactory

为平台创建工厂。可用于提供或覆盖针对你的应用程序的运行时需求的 Providers,比如 PLATFORM_INITIALIZERPLATFORM_ID

Creates a factory for a platform. Can be used to provide or override Providers specific to your application's runtime needs, such as PLATFORM_INITIALIZER and PLATFORM_ID.

destroyPlatform

销毁页面上的当前 Angular 平台和所有 Angular 应用程序。销毁在平台上注册的所有模块和监听器。

Destroys the current Angular platform and all Angular applications on the page. Destroys all modules and listeners registered with the platform.

enableProdMode

禁用 Angular 的开发模式,该模式将关闭框架中的断言和其他检查。

Disable Angular's development mode, which turns off assertions and other checks within the framework.

forwardRef

允许引用尚未定义的引用。

Allows to refer to references which are not yet defined.

getPlatform

返回当前平台。

Returns the current platform.

isDevMode

返回 Angular 是否处于开发模式。调用一次后,该值将被锁定,并且将不再更改。

Returns whether Angular is in development mode. After called once, the value is locked and won't change any more.

resolveForwardRef

从 forwardRef 惰性检索引用值。

Lazily retrieves the reference value from a forwardRef.

setTestabilityGetter

设置 Angular 测试框架使用的 GetTestability实现。

Set the GetTestabilityimplementation used by the Angular testing framework.

结构

Structures

AbstractType

表示抽象类 T,如果将其应用于具体类,它将无法被实例化。

Represents an abstract class T, if applied to a concrete class it would stop being instantiable.

AfterContentChecked

一个生命周期钩子,它会在默认的变更检测器对指令的所有内容完成了变更检查之后调用。

A lifecycle hook that is called after the default change detector has completed checking all content of a directive.

AfterContentInit

一个生命周期钩子,它会在 Angular 完全实例化了指令的所有内容之后调用。 定义一个 ngAfterContentInit() 方法来处理额外的初始化任务。

A lifecycle hook that is called after Angular has fully initialized all content of a directive. Define an ngAfterContentInit() method to handle any additional initialization tasks.

AfterViewChecked

一个生命周期钩子,它会在默认的变更检测器完成了对组件视图的变更检测之后调用。

A lifecycle hook that is called after the default change detector has completed checking a component's view for changes.

AfterViewInit

一个生命周期钩子,会在 Angular 完全初始化了组件的视图后调用。 定义一个 ngAfterViewInit() 方法来处理一些额外的初始化任务。

A lifecycle hook that is called after Angular has fully initialized a component's view. Define an ngAfterViewInit() method to handle any additional initialization tasks.

AttributeDecorator

属性装饰器/构造函数的类型。

Type of the Attribute decorator / constructor function.

ChangeDetectionStrategy

默认变更检测器用来检测更改的策略。设置后,将在下次触发变更检测时生效。

The strategy that the default change detector uses to detect changes. When set, takes effect the next time change detection is triggered.

ClassProvider

配置此 Injector 以便为令牌返回 useClass 的实例。

Configures the Injector to return an instance of useClass for a token.

ClassSansProvider

配置 Injector 以通过调用 useClass 函数返回某个值。是 ClassProvider 装饰器的基接口。

Configures the Injector to return a value by invoking a useClass function. Base for ClassProvider decorator.

ConstructorProvider

配置此 Injector,以返回令牌的实例。

Configures the Injector to return an instance of a token.

ConstructorSansProvider

配置此 Injector 以返回令牌的实例。

Configures the Injector to return an instance of a token.

DoBootstrap

挂钩以手动引导应用程序,而不是在 @NgModule 标记中的 bootstrap 数组。

Hook for manual bootstrapping of the application instead of using bootstrap array in @NgModule annotation.

DoCheck

一个生命周期钩子,除了使用默认的变更检查器执行检查之外,还会为指令执行自定义的变更检测函数。

A lifecycle hook that invokes a custom change-detection function for a directive, in addition to the check performed by the default change-detector.

ExistingProvider

配置此 Injector 以返回另一个 useExisting 令牌的值。

Configures the Injector to return a value of another useExisting token.

ExistingSansProvider

配置此 Injector 以返回另一个 useExisting 令牌的值。

Configures the Injector to return a value of another useExisting token.

FactoryProvider

配置此 Injector 以便调用 useFactory 函数返回一个值。

Configures the Injector to return a value by invoking a useFactory function.

FactorySansProvider

把此 Injector 配置为调用 useFactory 函数返回一个值。

Configures the Injector to return a value by invoking a useFactory function.

ForwardRefFn

要传给 forwardRef的函数时必须实现的接口。

An interface that a function passed into forwardRefhas to implement.

GetTestability

适配器接口,用于检索与特定上下文关联 Testability

Adapter interface for retrieving the Testability service associated for a particular context.

InjectFlags

DI 的注入标志。

Injection flags for DI.

InjectableType

具有 InjectableDef 静态字段的 Type

A Type which has a ɵprov: ɵɵInjectableDeclaration static field.

InjectorType

具有 InjectorDef 静态字段的类型。

A type which has an InjectorDef static field.

IterableChangeRecord

代表条目变更信息的记录。

Record representing the item change information.

IterableChanges

本对象描述自上次调用 IterableDiffer#diff() 以来 Iterable 集合中的变更。

An object describing the changes in the Iterable collection since last time IterableDiffer#diff() was invoked.

IterableDiffer

用来跟踪一个迭代内的更改的策略。NgForOf使用它通过对 DOM 进行等效更改来响应此迭代内的更改。

A strategy for tracking changes over time to an iterable. Used by NgForOfto respond to changes in an iterable by effecting equivalent changes in the DOM.

IterableDifferFactory

提供 IterableDiffer的工厂。

Provides a factory for IterableDiffer.

KeyValueChangeRecord

代表条目变更信息的记录。

Record representing the item change information.

KeyValueChanges

一个对象,描述自上次调用 KeyValueDiffer#diff() 以来的变化的 Map{[k:string]: string}

An object describing the changes in the Map or {[k:string]: string} since last time KeyValueDiffer#diff() was invoked.

KeyValueDiffer

跟踪对象随时间变化的差异。

A differ that tracks changes made to an object over time.

KeyValueDifferFactory

提供 KeyValueDiffer的工厂。

Provides a factory for KeyValueDiffer.

MissingTranslationStrategy

在系统启动时使用此枚举作为 bootstrapModule 的一个选项来定义策略,编译器应该在缺少翻译的情况下使用:

Use this enum at bootstrap as an option of bootstrapModule to define the strategy that the compiler should use in case of missing translations:

ModuleWithProviders

对 NgModule 及其相关 providers 的包装。不带泛型的用法已弃用。

A wrapper around an NgModule that associates it with providers. Usage without a generic type is deprecated.

OnChanges

一个生命周期钩子,当指令的任何一个可绑定属性发生变化时调用。 定义一个 ngOnChanges() 方法来处理这些变更。

A lifecycle hook that is called when any data-bound property of a directive changes. Define an ngOnChanges() method to handle the changes.

OnDestroy

一个生命周期钩子,它会在指令、管道或服务被销毁时调用。 用于在实例被销毁时,执行一些自定义清理代码。

A lifecycle hook that is called when a directive, pipe, or service is destroyed. Use for any custom cleanup that needs to occur when the instance is destroyed.

OnInit

一个生命周期钩子,它会在 Angular 初始化完了该指令的所有数据绑定属性之后调用。 定义 ngOnInit() 方法可以处理所有附加的初始化任务。

A lifecycle hook that is called after Angular has initialized all data-bound properties of a directive. Define an ngOnInit() method to handle any additional initialization tasks.

PipeTransform

一个需要由管道实现的接口,用于执行转换操作。 Angular 会调用它的 transform 方法,并把要绑定的值作为第一个参数传入,其它参数会依次从第二个参数的位置开始传入。

An interface that is implemented by pipes in order to perform a transformation. Angular invokes the transform method with the value of a binding as the first argument, and any parameters as the second argument in list form.

Predicate

根据参数值返回布尔值的函数,可能包括该值在数组中位置的上下文信息。

A boolean-valued function over a value, possibly including context information regarding that value's position in an array.

RendererStyleFlags2

渲染器特有样式修饰符的标志。

Flags for renderer-specific style modifiers.

RendererType2

RendererFactory2 用于将自定义渲染数据和样式与某个渲染器的实现相关联。

Used by RendererFactory2 to associate custom rendering data and styles with a rendering implementation.

ResolvedReflectiveProvider

Injector 使用的 Provider 的内部解析表示形式。

An internal resolved representation of a Provider used by the Injector.

SchemaMetadata

与 NgModule 关联的架构定义。

A schema definition associated with an NgModule.

SecurityContext

SecurityContext 标记了具有危险安全隐患的位置,例如,像 innerHTML 这样的 DOM 属性,如果处理不当,可能会导致跨站点脚本(XSS)安全错误。

A SecurityContext marks a location that has dangerous security implications, e.g. a DOM property like innerHTML that could cause Cross Site Scripting (XSS) security bugs when improperly handled.

SimpleChanges

SimpleChange对象表示的变更的哈希表,这些对象以声明的属性名称存储在指令或组件上,这些属性属于它们。这是传递给 ngOnChanges 钩子的类型。

A hashtable of changes represented by SimpleChangeobjects stored at the declared property name they belong to on a Directive or Component. This is the type passed to the ngOnChanges hook.

StaticClassProvider

配置 Injector 以返回 useClass 的令牌实例。

Configures the Injector to return an instance of useClass for a token.

StaticClassSansProvider

配置 Injector 以返回 useClass 的令牌实例。这是 StaticClassProvider 装饰器的基接口。

Configures the Injector to return an instance of useClass for a token. Base for StaticClassProvider decorator.

TrackByFunction

传给 NgForOf 指令的可选函数,该函数定义如何跟踪可迭代对象中条目的更改。该函数接受迭代索引和条目 ID 作为参数。提供后,Angular 将根据函数的返回值的变化进行跟踪。

An optional function passed into the NgForOf directive that defines how to track changes for items in an iterable. The function takes the iteration index and item ID. When supplied, Angular tracks changes by the return value of the function.

TypeDecorator

由所有 Angular 类型装饰器实现的接口,该接口允许将它们用作装饰器以及 Angular 语法。

An interface implemented by all Angular type decorators, which allows them to be used as decorators as well as Angular syntax.

TypeProvider

配置此 Injector,以将“类型”用作令牌时返回 Type 的实例。

Configures the Injector to return an instance of Type when `Type' is used as the token.

ValueProvider

配置此 Injector 以返回令牌的值。

Configures the Injector to return a value for a token.

ValueSansProvider

配置 Injector 以返回令牌的值。是 ValueProvider 装饰器的基接口。

Configures the Injector to return a value for a token. Base for ValueProvider decorator.

ViewEncapsulation

定义可用于 Component 的 Component的模板和样式封装选项。

Defines template and style encapsulation options available for Component's Component.

类型

Types

ANALYZE_FOR_ENTRY_COMPONENTS

已弃用: Since 9.0.0. With Ivy, this property is no longer necessary.

从 9.0.0 开始。使用 Ivy,不再需要此属性。

可用于创建虚拟提供者的 DI 令牌,该虚拟提供者将基于其 useValue 属性值填充组件和 NgModule 的 entryComponents 字段。useValue 值中引用的所有组件(无论是直接还是在嵌套数组还是在映射表中)都将添加到 entryComponents 属性。

A DI token that you can use to create a virtual provider that will populate the entryComponents field of components and NgModules based on its useValue property value. All components that are referenced in the useValue value (either directly or in a nested array or map) are added to the entryComponents property.

APP_BOOTSTRAP_LISTENER

一个 DI 令牌,该令牌提供了一组针对每个要引导的组件调用的回调。

A DI token that provides a set of callbacks to be called for every component that is bootstrapped.

APP_ID

表示唯一字符串 ID 的 DI 令牌,主要用于在使用 ViewEncapsulation.Emulated 时为应用程序属性和 CSS 样式添加前缀。

A DI token representing a unique string ID, used primarily for prefixing application attributes and CSS styles when ViewEncapsulation.Emulated is being used.

APP_INITIALIZER

可用于提供一个或多个初始化功能的 DI 令牌。

A DI token that you can use to provide one or more initialization functions.

COMPILER_OPTIONS

在平台注入器中提供 CompilerOptions 的令牌。

Token to provide CompilerOptions in the platform injector.

CUSTOM_ELEMENTS_SCHEMA

定义一个架构,该架构允许 NgModule 包含以下内容:

Defines a schema that allows an NgModule to contain the following:

CompilerOptions

用于创建编译器的选项

Options for creating a compiler

DEFAULT_CURRENCY_CODE

如果没有传递任何货币代码,请提供此令牌来设置你的应用程序用于 CurrencyPipe 的默认货币代码。仅由 CurrencyPipe 使用,与语言环境的货币无关。如果未配置,则默认为 USD。

Provide this token to set the default currency code your application uses for CurrencyPipe when there is no currency code passed into it. This is only used by CurrencyPipe and has no relation to locale currency. Defaults to USD if not configured.

INJECTOR

一个 InjectionToken,用于获取当前 InjectorcreateInjector() 式的注入器。

An InjectionToken that gets the current Injector for createInjector()-style injectors.

InjectableProvider

@Injectable 装饰器中使用的可注入对象提供者。

Injectable providers used in @Injectable decorator.

LOCALE_ID

提供此令牌以设置应用程序的语言环境。它通过 i18n 管道(DatePipe、I18nPluralPipe、CurrencyPipe、DecimalPipe 和 PercentPipe)和 ICU 表达式用于 i18n 提取。

Provide this token to set the locale of your application. It is used for i18n extraction, by i18n pipes (DatePipe, I18nPluralPipe, CurrencyPipe, DecimalPipe and PercentPipe) and by ICU expressions.

NO_ERRORS_SCHEMA

定义一个架构,该架构允许任何元素上的任何属性。

Defines a schema that allows any property on any element.

NgIterable

描述受支持的可迭代类型的类型。

A type describing supported iterable types.

PACKAGE_ROOT_URL

一个 DI 令牌,指示应用程序的根目录

A DI token that indicates the root directory of the application

PLATFORM_ID

标识不透明平台 ID 的令牌。

A token that indicates an opaque platform ID.

PLATFORM_INITIALIZER

平台初始化时执行的函数。

A function that is executed when a platform is initialized.

Provider

描述应该如何配置 Injector

Describes how the Injector should be configured.

ProviderToken

Token that can be used to retrieve an instance from an injector or through a query.

StaticProvider

描述如何将 Injector 配置为静态的(即不需要反射)。静态提供者为各种类型的依赖项提供令牌给注入器。

Describes how an Injector should be configured as static (that is, without reflection). A static provider provides tokens to an injector for various types of dependencies.

TRANSLATIONS

当你想用另一种语言翻译应用程序时,可以在引导程序中使用此令牌来提供翻译文件的内容( xtbxlfxlf2

Use this token at bootstrap to provide the content of your translation file (xtb, xlf or xlf2) when you want to translate your application in another language.

TRANSLATIONS_FORMAT

在引导程序中提供此令牌以设置 TRANSLATIONS的格式: xtbxlfxlf2

Provide this token at bootstrap to set the format of your TRANSLATIONS: xtb, xlf or xlf2.

defineInjectable

已弃用: in v8, delete after v10. This API should be used only by generated code, and that code should now use ɵɵdefineInjectable instead.

在 v8 中弃用,在 v10 之后删除。此 API 仅应由生成的代码使用,并且该代码现在应改用 ɵɵdefineInjectable。

getDebugNode
getModuleFactory

返回具有给定 id 的 NgModuleFactory(如果存在并且已加载)。无法检索未指定过 id 的模块工厂。如果找不到模块,则抛出该异常。

Returns the NgModuleFactory with the given id, if it exists and has been loaded. Factories for modules that do not specify an id cannot be retrieved. Throws if the module cannot be found.

inject

从当前活动的注入器中注入令牌。

Injects a token from the currently active injector.

platformCore

任何其他平台都必须包含此平台

This platform has to be included in any other platform