@angular/core

入口点

主要

@angular/core

次要

@angular/core/testing

导出列表

NgProbeToken

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

ApplicationInitStatus

A class that reflects the state of running APP_INITIALIZERs.

DebugElement
DebugNode
Testability

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

TestabilityRegistry

A global registry of Testabilityinstances for specific elements.

ApplicationModule

This module includes the providers of @angular/core that are needed to bootstrap components via ApplicationRef.

EventEmitter

Use in directives and components to emit custom events synchronously or asynchronously, and register handlers for those events by subscribing to an instance.

ErrorHandler

Provides a hook for centralized exception handling.

Sanitizer

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

Query

Base class for query metadata.

Version

Represents the version of Angular

Injector

Concrete injectors implement this interface.

ReflectiveInjector

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

ResolvedReflectiveFactory

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

ReflectiveKey

A unique object used for retrieving items from the ReflectiveInjector.

InjectionToken

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

NgZone

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

RenderComponentType
Renderer
Renderer2

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.

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

RendererFactory2

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

RootRenderer

Injectable service that provides a low-level interface for modifying the UI.

Compiler

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

ModuleWithComponentFactories

Combination of NgModuleFactory and ComponentFactorys.

ComponentFactory
ComponentRef

Represents an instance of a Component created via a ComponentFactory.

ComponentFactoryResolver
ElementRef
NgModuleFactory
NgModuleRef

Represents an instance of an NgModule created via a NgModuleFactory.

NgModuleFactoryLoader

Used to load ng module factories.

QueryList

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

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

SystemJsNgModuleLoader

NgModuleFactoryLoader that uses SystemJS to load NgModuleFactory

SystemJsNgModuleLoaderConfig

Configuration for SystemJsNgModuleLoader. token.

TemplateRef

Represents an Embedded Template that can be used to instantiate Embedded Views.

代表一个可用来实例化内嵌视图的内嵌模板。

ViewContainerRef

Represents a container where one or more Views can be attached.

代表一个容器,可以在里面附加一个或多个视图。

EmbeddedViewRef

Represents an Angular View.

ViewRef
ChangeDetectorRef
DefaultIterableDiffer
IterableDiffers

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

KeyValueDiffers

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

SimpleChange

Represents a basic change from a previous to a new value.

表示从旧值到新值的一次变更。

WrappedValue

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

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

装饰器

Attribute

Attribute decorator and metadata.

ContentChild

Configures a content query.

ContentChildren

Configures a content query.

ViewChild

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.

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

ViewChildren

Configures a view query.

Component

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.

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

Directive

Marks a class as an Angular directive. You can define your own directives to attach custom behavior to elements in the DOM. The options provide configuration metadata that determines how the directive should be processed, instantiated and used at runtime.

把一个类标记为 Angular 指令。你可以定义自己的指令来为 DOM 中的元素添加自定义行为。 该选项提供配置元数据,用于决定该指令在运行期间要如何处理、实例化和使用。

HostBinding
HostListener

Binds a CSS event to a host listener and supplies configuration metadata. Angular invokes the supplied handler method when the host element emits the specified event, and updates the bound element with the result. If the handler method returns false, applies preventDefault on the bound element.

把一个事件绑定到一个宿主监听器,并提供配置元数据。 当宿主元素发出特定的事件时,Angular 就会执行所提供的处理器方法,并使用其结果更新所绑定到的元素。 如果该事件处理器返回 false,则在所绑定的元素上执行 preventDefault

Input
Output
Pipe
NgModule
Injectable

A marker metadata that marks a class as available to Injector for creation.

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

Inject

A constructor parameter decorator that specifies a custom provider of a dependency.

Optional

A constructor parameter decorator that marks a dependency as optional.

Self

A constructor parameter decorator that tells the DI framework to retrieve a dependency only from the local injector.

SkipSelf

A constructor parameter decorator that tells the DI framework that dependency resolution should start from the parent injector.

Host

A constructor parameter decorator that tells the DI framework to retrieve a dependency from any injector until reaching the host element of the current component.

函数

createPlatform

Creates a platform. Platforms have to be eagerly created via this function.

assertPlatform

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

destroyPlatform

Destroy the existing platform.

getPlatform

Returns the current platform.

enableProdMode

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

isDevMode

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

createPlatformFactory

Creates a factory for a platform

asNativeElements
getDebugNode
setTestabilityGetter

Set the GetTestabilityimplementation used by the Angular testing framework.

defineInjectable

Construct an InjectableDef which defines how a token will be constructed by the DI system, and in which injectors (if any) it will be available.

defineInjector

Construct an InjectorDef which configures an injector.

forwardRef

Allows to refer to references which are not yet defined.

resolveForwardRef

Lazily retrieves the reference value from a forwardRef.

inject
createInjector

Create a new Injector which is configured using a defType of InjectorType<any>s.

getModuleFactory

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.

结构

TypeDecorator

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

PlatformRef

The Angular platform is the entry point for Angular on a web page. Each page has exactly one platform, and services (such as reflection) which are common to every Angular application running on the page are bound in its scope.

ApplicationRef

A reference to an Angular application running on a page.

Predicate

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

GetTestability

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

MissingTranslationStrategy

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

  • Error: throw if you have missing translations.
  • Warning (default): show a warning in the console and/or shell.
  • Ignore: do nothing.
WtfScopeFn

A scope function for the Web Tracing Framework (WTF).

Type

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

SecurityContext
AfterContentChecked

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

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

AfterContentInit

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.

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

AfterViewChecked

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

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

AfterViewInit

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.

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

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.

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

OnChanges

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

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

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

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.

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

ModuleWithProviders

A wrapper around an NgModule that associates it with the providers.

对 NgModule 及其相关 providers 的包装。

SchemaMetadata

A schema definition associated with an NgModule.

与 NgModule 相关的 schema(HTML架构)定义。

ViewEncapsulation
InjectableType

A Type which has an InjectableDef static field.

InjectorType

A type which has an InjectorDef static field.

ForwardRefFn

An interface that a function passed into forwardRefhas to implement.

InjectFlags

Injection flags for DI.

ValueProvider

Configures the Injector to return a value for a token.

ConstructorSansProvider

Configures the Injector to return an instance of a token.

ExistingProvider

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

FactoryProvider

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

TypeProvider

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

ClassProvider

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

ResolvedReflectiveProvider

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

RendererStyleFlags2

Flags for renderer-specific style modifiers.

RendererType2

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

ChangeDetectionStrategy
CollectionChangeRecord
IterableChangeRecord

Record representing the item change information.

IterableChanges

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

IterableDiffer

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

Provides a factory for IterableDiffer.

KeyValueChangeRecord

Record representing the item change information.

KeyValueChanges

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

Provides a factory for KeyValueDiffer.

PipeTransform
SimpleChanges

Defines an object that associates properties with instances of SimpleChange.

定义一个对象,它把属性与 SimpleChange 的实例关联起来。

TrackByFunction

An optional function passed into NgForOfthat defines how to track items in an iterable (e.g. fby index or id)

类型

APP_ID

A DI Token representing a unique string id assigned to the application by Angular and used primarily for prefixing application attributes and CSS styles when ViewEncapsulation.Emulated is being used.

PACKAGE_ROOT_URL

A token which indicates the root directory of the application

PLATFORM_INITIALIZER

A function that will be executed when a platform is initialized.

PLATFORM_ID

A token that indicates an opaque platform id.

APP_BOOTSTRAP_LISTENER

All callbacks provided via this token will be called for every component that is bootstrapped. Signature of the callback:

APP_INITIALIZER

A function that will be executed when an application is initialized.

TRANSLATIONS

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

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

LOCALE_ID

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.

wtfCreateScope

Create trace scope.

wtfLeave

Used to mark end of Scope.

wtfStartTimeRange

Used to mark Async start. Async are similar to scope but they don't have to be strictly nested. The return value is used in the call to [endAsync]. Async ranges only work if WTF has been enabled.

wtfEndTimeRange

Ends a async time range operation. [range] is the return value from [wtfStartTimeRange] Async ranges only work if WTF has been enabled.

ANALYZE_FOR_ENTRY_COMPONENTS

This token can be used to create a virtual provider that will populate the entryComponents fields of components and ng modules based on its useValue. All components that are referenced in the useValue value (either directly or in a nested array or map) will be added to the entryComponents property.

CUSTOM_ELEMENTS_SCHEMA

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

定义一个 schema,它允许 NgModule 包含下列内容:

NO_ERRORS_SCHEMA

Defines a schema that allows any property on any element.

定义了一个允许任何元素上的任何属性的 schema。

InjectableProvider

Injectable providers used in @Injectable decorator.

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

INJECTOR

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

StaticProvider

Describes how the Injector should be configured in a static way (Without reflection).

Provider

Describes how the Injector should be configured.

COMPILER_OPTIONS

Token to provide CompilerOptions in the platform injector.

CompilerOptions

Options for creating a compiler

NgIterable

A type describing supported iterable types.

platformCore

This platform has to be included in any other platform