填写这份《一分钟调查》,帮我们(开发组)做得更好!去填写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.

入口点

主要

@angular/core

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

次要

@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.

主入口点的导出

模块

ApplicationModule

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

ApplicationInitStatus

A class that reflects the state of running APP_INITIALIZERs.

ChangeDetectorRef

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

Base class for Angular Views, 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 rerendered.

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

ComponentFactory

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

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

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

DebugEventListener
DefaultIterableDiffer

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

ElementRef

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

A wrapper around a native element inside of a View.

EmbeddedViewRef

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

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

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

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.

ModuleWithComponentFactories

Combination of NgModuleFactory and ComponentFactorys.

NgModuleFactory
NgModuleFactoryLoader

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

Used to load ng module factories.

NgModuleRef

Represents an instance of an NgModule created via a NgModuleFactory.

NgProbeToken

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

NgZone

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

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.

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

ReflectiveKey

已废弃: No replacement

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

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

ResolvedReflectiveFactory

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

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.

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.

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

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.

Version

Represents the version of Angular

ViewContainerRef

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

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

ViewRef

Represents an Angular view, specifically the host view that is defined by a component. Also serves as the base class that adds destroy methods for embedded views.

WrappedValue

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

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

装饰器

Attribute

Parameter decorator for a directive constructor that designates a host-element attribute whose value is injected as a constant string literal.

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

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

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

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

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

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

SkipSelf

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.

函数

asNativeElements
assertPlatform

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

createPlatform

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

createPlatformFactory

Creates a factory for a platform

destroyPlatform

Destroy the existing platform.

enableProdMode

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

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

resolveForwardRef

Lazily retrieves the reference value from a forwardRef.

setTestabilityGetter

Set the GetTestabilityimplementation used by the Angular testing framework.

结构

AbstractType

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

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.

ApplicationRef

A reference to an Angular application running on a page.

ChangeDetectionStrategy

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

ClassProvider

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

ClassSansProvider

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

CollectionChangeRecord

已废弃: v4.0.0 - Use IterableChangeRecord instead.

ConstructorProvider

Configures the Injector to return an instance of a token.

ConstructorSansProvider

Configures the Injector to return an instance of a token.

DebugElement
DebugNode
DoBootstrap

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

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

ExistingSansProvider

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

FactoryProvider

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

FactorySansProvider

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

ForwardRefFn

An interface that a function passed into forwardRefhas to implement.

GetTestability

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

InjectFlags

Injection flags for DI.

InjectableType

A Type which has an InjectableDef static field.

InjectorType

A type which has an InjectorDef static field.

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.

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.
ModuleWithProviders

对 NgModule 及其相关 providers 的包装。

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

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.

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.

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

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

ResolvedReflectiveProvider

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

SchemaMetadata

A schema definition associated with an NgModule.

SecurityContext

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

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

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

StaticClassSansProvider

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

TrackByFunction

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.

Type

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

TypeDecorator

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

TypeProvider

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

ValueProvider

Configures the Injector to return a value for a token.

ValueSansProvider

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

ViewEncapsulation

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

类型

ANALYZE_FOR_ENTRY_COMPONENTS

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

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

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

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.

APP_INITIALIZER

An injection token that allows you to provide one or more initialization functions. These function are injected at application startup and executed during app initialization. If any of these functions returns a Promise, initialization does not complete until the Promise is resolved.

COMPILER_OPTIONS

Token to provide CompilerOptions in the platform injector.

CUSTOM_ELEMENTS_SCHEMA

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

  • Non-Angular elements named with dash case (-).
  • Element properties named with dash case (-). Dash case is the naming convention for custom elements.
CompilerOptions

Options for creating a compiler

DEFAULT_CURRENCY_CODE

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

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

InjectableProvider

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

Injectable providers used in @Injectable decorator.

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.

NO_ERRORS_SCHEMA

Defines a schema that allows any property on any element.

NgIterable

A type describing supported iterable types.

PACKAGE_ROOT_URL

A token which indicates the root directory of the application

PLATFORM_ID

A token that indicates an opaque platform id.

PLATFORM_INITIALIZER

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

Provider

Describes how the Injector should be configured.

StaticProvider

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

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.

defineInjectable

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

getDebugNode
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.

inject

Injects a token from the currently active injector.

platformCore

This platform has to be included in any other platform