填寫這份《一分鐘調查》,幫我們(開發組)做得更好!去填寫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

為應用配置根注入器,它帶有 ApplicationRef 在引導元件時所需的來自 @angular/core 的提供者。

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

類別

ApplicationInitStatus

反映正在執行的 APP_INITIALIZER函式狀態的類別。

A class that reflects the state of running APP_INITIALIZERfunctions.

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

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.

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

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.

裝飾器

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.

函式

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 applciation'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.

結構

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.

ApplicationRef

對頁面上執行的 Angular 應用程式的參考。

A reference to an Angular application running on a page.

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 an InjectableDef 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.

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.

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.

型別

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 令牌,該令牌提供了一組針對每個要引導的元件呼叫的回呼(Callback)。

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.

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