@angular/core
- Version 16.0.4
- Published
- 18 MB
- 1 dependency
- MIT license
Install
npm i @angular/core
yarn add @angular/core
pnpm add @angular/core
Overview
Angular - the core framework
Index
Variables
- ANIMATION_MODULE_TYPE
- APP_BOOTSTRAP_LISTENER
- APP_ID
- APP_INITIALIZER
- Attribute
- CHILD_HEAD
- CHILD_TAIL
- CLEANUP
- COMPILER_OPTIONS
- Component
- CONTAINERS
- ContentChild
- ContentChildren
- CONTEXT
- createNgModuleRef
- CSP_NONCE
- CUSTOM_ELEMENTS_SCHEMA
- DECLARATION_COMPONENT_VIEW
- DECLARATION_LCONTAINER
- DECLARATION_VIEW
- DEFAULT_CURRENCY_CODE
- defineInjectable
- DEHYDRATED_VIEWS
- DESCENDANT_VIEWS_TO_REFRESH
- Directive
- DISCONNECTED_NODES
- ELEMENT_CONTAINERS
- ELEMENT_MARKER
- EMBEDDED_VIEW_INJECTOR
- ENVIRONMENT
- ENVIRONMENT_INITIALIZER
- EventEmitter
- FLAGS
- HAS_TRANSPLANTED_VIEWS
- Host
- HOST
- HostBinding
- HostListener
- HYDRATION
- ICU_MARKER
- ID
- Inject
- Injectable
- INJECTOR
- INJECTOR_2
- Input
- ITS_JUST_ANGULAR
- LOCALE_ID
- MOVED_VIEWS
- MULTIPLIER
- NATIVE
- NEXT
- NgModule
- NO_ERRORS_SCHEMA
- NODES
- NUM_ROOT_NODES
- ON_DESTROY_HOOKS
- Optional
- Output
- ɵALLOW_MULTIPLE_PLATFORMS
- ɵDEFAULT_LOCALE_ID
- ɵdefaultIterableDiffers
- ɵdefaultKeyValueDiffers
- ɵENABLED_SSR_FEATURES
- ɵglobal
- ɵINJECTOR_SCOPE
- ɵIS_HYDRATION_DOM_REUSE_ENABLED
- ɵNG_COMP_DEF
- ɵNG_DIR_DEF
- ɵNG_ELEMENT_ID
- ɵNG_INJ_DEF
- ɵNG_MOD_DEF
- ɵNG_PIPE_DEF
- ɵNG_PROV_DEF
- ɵNO_CHANGE
- ɵNOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR
- ɵTESTABILITY
- ɵTESTABILITY_GETTER
- ɵXSS_SECURITY_URL
- PACKAGE_ROOT_URL
- PARENT
- Pipe
- PLATFORM_ID
- PLATFORM_INITIALIZER
- PREORDER_HOOK_FLAGS
- QUERIES
- REACTIVE_HOST_BINDING_CONSUMER
- REACTIVE_TEMPLATE_CONSUMER
- RENDERER
- Self
- SIGNAL
- SkipSelf
- T_HOST
- TEMPLATE_ID
- TEMPLATES
- TRANSLATIONS
- TRANSLATIONS_FORMAT
- TVIEW
- Type
- TYPE
- VERSION
- VIEW_REFS
- ViewChild
- ViewChildren
Functions
- asNativeElements()
- assertInInjectionContext()
- assertPlatform()
- computed()
- createComponent()
- createEnvironmentInjector()
- createNgModule()
- createPlatform()
- createPlatformFactory()
- destroyPlatform()
- effect()
- enableProdMode()
- forwardRef()
- getDebugNode()
- getModuleFactory()
- getNgModuleById()
- getPlatform()
- importProvidersFrom()
- inject()
- isDevMode()
- isSignal()
- isStandalone()
- makeEnvironmentProviders()
- makeStateKey()
- mergeApplicationConfig()
- ɵ_sanitizeHtml()
- ɵ_sanitizeUrl()
- ɵallowSanitizationBypassAndThrow()
- ɵannotateForHydration()
- ɵbypassSanitizationTrustHtml()
- ɵbypassSanitizationTrustResourceUrl()
- ɵbypassSanitizationTrustScript()
- ɵbypassSanitizationTrustStyle()
- ɵbypassSanitizationTrustUrl()
- ɵclearResolutionOfComponentResourcesQueue()
- ɵcoerceToBoolean()
- ɵcompileComponent()
- ɵcompileDirective()
- ɵcompileNgModule()
- ɵcompileNgModuleDefs()
- ɵcompileNgModuleFactory()
- ɵcompilePipe()
- ɵconvertToBitFlags()
- ɵcreateInjector()
- ɵdetectChanges()
- ɵdevModeEqual()
- ɵfindLocaleData()
- ɵflushModuleScopingQueueAsMuchAsPossible()
- ɵformatRuntimeError()
- ɵgetDebugNode()
- ɵgetDirectives()
- ɵgetHostElement()
- ɵgetInjectableDef()
- ɵgetLContext()
- ɵgetLocaleCurrencyCode()
- ɵgetLocalePluralCase()
- ɵgetSanitizationBypassType()
- ɵgetUnknownElementStrictMode()
- ɵgetUnknownPropertyStrictMode()
- ɵinjectChangeDetectorRef()
- ɵinternalCreateApplication()
- ɵisBoundToModule()
- ɵisEnvironmentProviders()
- ɵisInjectable()
- ɵisNgModule()
- ɵisPromise()
- ɵisSubscribable()
- ɵLifecycleHooksFeature()
- ɵnoSideEffects()
- ɵɵadvance()
- ɵɵattribute()
- ɵɵattributeInterpolate1()
- ɵɵattributeInterpolate2()
- ɵɵattributeInterpolate3()
- ɵɵattributeInterpolate4()
- ɵɵattributeInterpolate5()
- ɵɵattributeInterpolate6()
- ɵɵattributeInterpolate7()
- ɵɵattributeInterpolate8()
- ɵɵattributeInterpolateV()
- ɵɵclassMap()
- ɵɵclassMapInterpolate1()
- ɵɵclassMapInterpolate2()
- ɵɵclassMapInterpolate3()
- ɵɵclassMapInterpolate4()
- ɵɵclassMapInterpolate5()
- ɵɵclassMapInterpolate6()
- ɵɵclassMapInterpolate7()
- ɵɵclassMapInterpolate8()
- ɵɵclassMapInterpolateV()
- ɵɵclassProp()
- ɵɵcontentQuery()
- ɵɵCopyDefinitionFeature()
- ɵɵdefineComponent()
- ɵɵdefineDirective()
- ɵɵdefineInjectable()
- ɵɵdefineInjector()
- ɵɵdefineNgModule()
- ɵɵdefinePipe()
- ɵɵdirectiveInject()
- ɵɵdisableBindings()
- ɵɵelement()
- ɵɵelementContainer()
- ɵɵelementContainerEnd()
- ɵɵelementContainerStart()
- ɵɵelementEnd()
- ɵɵelementStart()
- ɵɵenableBindings()
- ɵɵgetCurrentView()
- ɵɵgetInheritedFactory()
- ɵɵHostDirectivesFeature()
- ɵɵhostProperty()
- ɵɵi18n()
- ɵɵi18nApply()
- ɵɵi18nAttributes()
- ɵɵi18nEnd()
- ɵɵi18nExp()
- ɵɵi18nPostprocess()
- ɵɵi18nStart()
- ɵɵInheritDefinitionFeature()
- ɵɵinject()
- ɵɵinjectAttribute()
- ɵɵinvalidFactory()
- ɵɵinvalidFactoryDep()
- ɵɵlistener()
- ɵɵloadQuery()
- ɵɵnamespaceHTML()
- ɵɵnamespaceMathML()
- ɵɵnamespaceSVG()
- ɵɵnextContext()
- ɵɵngDeclareClassMetadata()
- ɵɵngDeclareComponent()
- ɵɵngDeclareDirective()
- ɵɵngDeclareFactory()
- ɵɵngDeclareInjectable()
- ɵɵngDeclareInjector()
- ɵɵngDeclareNgModule()
- ɵɵngDeclarePipe()
- ɵɵNgOnChangesFeature()
- ɵɵpipe()
- ɵɵpipeBind1()
- ɵɵpipeBind2()
- ɵɵpipeBind3()
- ɵɵpipeBind4()
- ɵɵpipeBindV()
- ɵɵprojection()
- ɵɵprojectionDef()
- ɵɵproperty()
- ɵɵpropertyInterpolate()
- ɵɵpropertyInterpolate1()
- ɵɵpropertyInterpolate2()
- ɵɵpropertyInterpolate3()
- ɵɵpropertyInterpolate4()
- ɵɵpropertyInterpolate5()
- ɵɵpropertyInterpolate6()
- ɵɵpropertyInterpolate7()
- ɵɵpropertyInterpolate8()
- ɵɵpropertyInterpolateV()
- ɵɵProvidersFeature()
- ɵɵpureFunction0()
- ɵɵpureFunction1()
- ɵɵpureFunction2()
- ɵɵpureFunction3()
- ɵɵpureFunction4()
- ɵɵpureFunction5()
- ɵɵpureFunction6()
- ɵɵpureFunction7()
- ɵɵpureFunction8()
- ɵɵpureFunctionV()
- ɵɵqueryRefresh()
- ɵɵreference()
- ɵɵregisterNgModuleType()
- ɵɵresetView()
- ɵɵresolveBody()
- ɵɵresolveDocument()
- ɵɵresolveWindow()
- ɵɵrestoreView()
- ɵɵsanitizeHtml()
- ɵɵsanitizeResourceUrl()
- ɵɵsanitizeScript()
- ɵɵsanitizeStyle()
- ɵɵsanitizeUrl()
- ɵɵsanitizeUrlOrResourceUrl()
- ɵɵsetComponentScope()
- ɵɵsetNgModuleScope()
- ɵɵStandaloneFeature()
- ɵɵstyleMap()
- ɵɵstyleMapInterpolate1()
- ɵɵstyleMapInterpolate2()
- ɵɵstyleMapInterpolate3()
- ɵɵstyleMapInterpolate4()
- ɵɵstyleMapInterpolate5()
- ɵɵstyleMapInterpolate6()
- ɵɵstyleMapInterpolate7()
- ɵɵstyleMapInterpolate8()
- ɵɵstyleMapInterpolateV()
- ɵɵstyleProp()
- ɵɵstylePropInterpolate1()
- ɵɵstylePropInterpolate2()
- ɵɵstylePropInterpolate3()
- ɵɵstylePropInterpolate4()
- ɵɵstylePropInterpolate5()
- ɵɵstylePropInterpolate6()
- ɵɵstylePropInterpolate7()
- ɵɵstylePropInterpolate8()
- ɵɵstylePropInterpolateV()
- ɵɵsyntheticHostListener()
- ɵɵsyntheticHostProperty()
- ɵɵtemplate()
- ɵɵtemplateRefExtractor()
- ɵɵtext()
- ɵɵtextInterpolate()
- ɵɵtextInterpolate1()
- ɵɵtextInterpolate2()
- ɵɵtextInterpolate3()
- ɵɵtextInterpolate4()
- ɵɵtextInterpolate5()
- ɵɵtextInterpolate6()
- ɵɵtextInterpolate7()
- ɵɵtextInterpolate8()
- ɵɵtextInterpolateV()
- ɵɵtrustConstantHtml()
- ɵɵtrustConstantResourceUrl()
- ɵɵvalidateIframeAttribute()
- ɵɵviewQuery()
- ɵpatchComponentDefWithScope()
- ɵpublishDefaultGlobalUtils()
- ɵpublishGlobalUtil()
- ɵregisterLocaleData()
- ɵresetCompiledComponents()
- ɵresetJitOptions()
- ɵresolveComponentResources()
- ɵsetAllowDuplicateNgModuleIdsForTest()
- ɵsetAlternateWeakRefImpl()
- ɵsetClassMetadata()
- ɵsetCurrentInjector()
- ɵsetDocument()
- ɵsetLocaleId()
- ɵsetUnknownElementStrictMode()
- ɵsetUnknownPropertyStrictMode()
- ɵstore()
- ɵstringify()
- ɵtransitiveScopesFor()
- ɵunregisterLocaleData()
- ɵunwrapSafeValue()
- ɵwithDomHydration()
- platformCore()
- provideZoneChangeDetection()
- reflectComponentType()
- resolveForwardRef()
- runInInjectionContext()
- setTestabilityGetter()
- signal()
- untracked()
Classes
Interfaces
Enums
Type Aliases
- CompilerOptions
- ContentChild
- ContentChildren
- EffectCleanupFn
- EnvironmentProviders
- ImportedNgModuleProviders
- ImportProvidersSource
- InjectableProvider
- NgIterable
- ɵCssSelectorList
- ɵɵComponentDeclaration
- ɵɵDirectiveDeclaration
- ɵɵFactoryDeclaration
- ɵɵInjectorDeclaration
- ɵɵNgModuleDeclaration
- ɵɵPipeDeclaration
- Provider
- ProviderToken
- Signal
- StateKey
- StaticProvider
- ValueEqualityFn
- ViewChild
- ViewChildren
Namespaces
Variables
variable ANIMATION_MODULE_TYPE
const ANIMATION_MODULE_TYPE: InjectionToken<'NoopAnimations' | 'BrowserAnimations'>;
A [DI token](guide/glossary#di-token "DI token definition") that indicates which animations module has been loaded.
variable APP_BOOTSTRAP_LISTENER
const APP_BOOTSTRAP_LISTENER: InjectionToken< ((compRef: ComponentRef<any>) => void)[]>;
A [DI token](guide/glossary#di-token "DI token definition") that provides a set of callbacks to be called for every component that is bootstrapped.
Each callback must take a
ComponentRef
instance and return nothing.(componentRef: ComponentRef) => void
variable APP_ID
const APP_ID: InjectionToken<string>;
A [DI token](guide/glossary#di-token "DI token definition") representing a string ID, used primarily for prefixing application attributes and CSS styles when is being used.
The token is needed in cases when multiple applications are bootstrapped on a page (for example, using
bootstrapApplication
calls). In this case, ensure that those applications have differentAPP_ID
value setup. For example:bootstrapApplication(ComponentA, {providers: [{ provide: APP_ID, useValue: 'app-a' },// ... other providers ...]});bootstrapApplication(ComponentB, {providers: [{ provide: APP_ID, useValue: 'app-b' },// ... other providers ...]});By default, when there is only one application bootstrapped, you don't need to provide the
APP_ID
token (theng
will be used as an app ID).
variable APP_INITIALIZER
const APP_INITIALIZER: InjectionToken< readonly (() => Observable<unknown> | Promise<unknown> | void)[]>;
A [DI token](guide/glossary#di-token "DI token definition") that you can use to provide one or more initialization functions.
The provided functions are injected at application startup and executed during app initialization. If any of these functions returns a Promise or an Observable, initialization does not complete until the Promise is resolved or the Observable is completed.
You can, for example, create a factory function that loads language data or an external configuration, and provide that function to the
APP_INITIALIZER
token. The function is executed during the application bootstrap process, and the needed data is available on startup.See Also
ApplicationInitStatus
The following example illustrates how to configure a multi-provider using
APP_INITIALIZER
token and a function returning a promise.function initializeApp(): Promise<any> {return new Promise((resolve, reject) => {// Do some asynchronous stuffresolve();});}@NgModule({imports: [BrowserModule],declarations: [AppComponent],bootstrap: [AppComponent],providers: [{provide: APP_INITIALIZER,useFactory: () => initializeApp,multi: true}]})export class AppModule {}It's also possible to configure a multi-provider using
APP_INITIALIZER
token and a function returning an observable, see an example below. Note: theHttpClient
in this example is used for demo purposes to illustrate how the factory function can work with other providers available through DI.function initializeAppFactory(httpClient: HttpClient): () => Observable<any> {return () => httpClient.get("https://someUrl.com/api/user").pipe(tap(user => { ... }));}@NgModule({imports: [BrowserModule, HttpClientModule],declarations: [AppComponent],bootstrap: [AppComponent],providers: [{provide: APP_INITIALIZER,useFactory: initializeAppFactory,deps: [HttpClient],multi: true}]})export class AppModule {}
variable Attribute
const Attribute: AttributeDecorator;
Attribute decorator and metadata.
variable CHILD_HEAD
const CHILD_HEAD: number;
variable CHILD_TAIL
const CHILD_TAIL: number;
variable CLEANUP
const CLEANUP: number;
variable COMPILER_OPTIONS
const COMPILER_OPTIONS: InjectionToken<CompilerOptions[]>;
Token to provide CompilerOptions in the platform injector.
variable Component
const Component: ComponentDecorator;
Component decorator and metadata.
variable CONTAINERS
const CONTAINERS: string;
variable ContentChild
const ContentChild: ContentChildDecorator;
ContentChild decorator and metadata.
variable ContentChildren
const ContentChildren: ContentChildrenDecorator;
ContentChildren decorator and metadata.
variable CONTEXT
const CONTEXT: number;
variable createNgModuleRef
const createNgModuleRef: <T>( ngModule: Type<T>, parentInjector?: Injector) => NgModuleRef<T>;
The
createNgModule
function alias for backwards-compatibility. Please avoid using it directly and usecreateNgModule
instead.Deprecated
Use
createNgModule
instead.
variable CSP_NONCE
const CSP_NONCE: InjectionToken<string>;
Token used to configure the [Content Security Policy](https://web.dev/strict-csp/) nonce that Angular will apply when inserting inline styles. If not provided, Angular will look up its value from the
ngCspNonce
attribute of the application root node.
variable CUSTOM_ELEMENTS_SCHEMA
const CUSTOM_ELEMENTS_SCHEMA: SchemaMetadata;
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.
variable DECLARATION_COMPONENT_VIEW
const DECLARATION_COMPONENT_VIEW: number;
variable DECLARATION_LCONTAINER
const DECLARATION_LCONTAINER: number;
variable DECLARATION_VIEW
const DECLARATION_VIEW: number;
variable DEFAULT_CURRENCY_CODE
const DEFAULT_CURRENCY_CODE: InjectionToken<string>;
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.
See the [i18n guide](guide/i18n-common-locale-id) for more information.
**Deprecation notice:**
The default currency code is currently always
USD
but this is deprecated from v9.**In v10 the default currency code will be taken from the current locale.**
If you need the previous behavior then set it by creating a
DEFAULT_CURRENCY_CODE
provider in your applicationNgModule
:{provide: DEFAULT_CURRENCY_CODE, useValue: 'USD'}### Example
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';import { AppModule } from './app/app.module';platformBrowserDynamic().bootstrapModule(AppModule, {providers: [{provide: DEFAULT_CURRENCY_CODE, useValue: 'EUR' }]});
variable defineInjectable
const defineInjectable: <T>(opts: { token: unknown; providedIn?: Type<any> | 'root' | 'platform' | 'any' | 'environment'; factory: () => T;}) => unknown;
Deprecated
in v8, delete after v10. This API should be used only by generated code, and that code should now use ɵɵdefineInjectable instead.
variable DEHYDRATED_VIEWS
const DEHYDRATED_VIEWS: number;
variable DESCENDANT_VIEWS_TO_REFRESH
const DESCENDANT_VIEWS_TO_REFRESH: number;
variable Directive
const Directive: DirectiveDecorator;
Type of the Directive metadata.
variable DISCONNECTED_NODES
const DISCONNECTED_NODES: string;
variable ELEMENT_CONTAINERS
const ELEMENT_CONTAINERS: string;
Keys within serialized view data structure to represent various parts. See the
SerializedView
interface below for additional information.
variable ELEMENT_MARKER
const ELEMENT_MARKER: ELEMENT_MARKER;
Marks that the next string is an element name.
See
I18nMutateOpCodes
documentation.
variable EMBEDDED_VIEW_INJECTOR
const EMBEDDED_VIEW_INJECTOR: number;
variable ENVIRONMENT
const ENVIRONMENT: number;
variable ENVIRONMENT_INITIALIZER
const ENVIRONMENT_INITIALIZER: InjectionToken<() => void>;
A multi-provider token for initialization functions that will run upon construction of an environment injector.
variable EventEmitter
const EventEmitter: { new (isAsync?: boolean): EventEmitter<any>; new <T>(isAsync?: boolean): EventEmitter<T>; readonly prototype: EventEmitter<any>;};
variable FLAGS
const FLAGS: number;
variable HAS_TRANSPLANTED_VIEWS
const HAS_TRANSPLANTED_VIEWS: number;
Flag to signify that this
LContainer
may have transplanted views which need to be change detected. (see:LView[DECLARATION_COMPONENT_VIEW])
.This flag, once set, is never unset for the
LContainer
. This means that when unset we can skip a lot of work inrefreshEmbeddedViews
. But when set we still need to verify that theMOVED_VIEWS
are transplanted and on-push.
variable Host
const Host: HostDecorator;
Host decorator and metadata.
variable HOST
const HOST: number;
variable HostBinding
const HostBinding: HostBindingDecorator;
variable HostListener
const HostListener: HostListenerDecorator;
Decorator that binds a DOM 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.The following example declares a directive that attaches a click listener to a button and counts clicks.
@Directive({selector: 'button[counting]'})class CountClicks {numberOfClicks = 0;@HostListener('click', ['$event.target'])onClick(btn) {console.log('button', btn, 'number of clicks:', this.numberOfClicks++);}}@Component({selector: 'app',template: '<button counting>Increment</button>',})class App {}The following example registers another DOM event handler that listens for
Enter
key-press events on the globalwindow
.import { HostListener, Component } from "@angular/core";@Component({selector: 'app',template: `<h1>Hello, you have pressed enter {{counter}} number of times!</h1> Press enter keyto increment the counter.<button (click)="resetCounter()">Reset Counter</button>`})class AppComponent {counter = 0;@HostListener('window:keydown.enter', ['$event'])handleKeyDown(event: KeyboardEvent) {this.counter++;}resetCounter() {this.counter = 0;}}The list of valid key names for
keydown
andkeyup
events can be found here: https://www.w3.org/TR/DOM-Level-3-Events-key/#named-key-attribute-valuesNote that keys can also be combined, e.g.
@HostListener('keydown.shift.a')
.The global target names that can be used to prefix an event name are
document:
,window:
andbody:
.
variable HYDRATION
const HYDRATION: number;
variable ICU_MARKER
const ICU_MARKER: ICU_MARKER;
Marks that the next string is comment text need for ICU.
See
I18nMutateOpCodes
documentation.
variable ID
const ID: number;
variable Inject
const Inject: InjectDecorator;
Inject decorator and metadata.
variable Injectable
const Injectable: InjectableDecorator;
Injectable decorator and metadata.
variable INJECTOR
const INJECTOR: InjectionToken<Injector>;
An InjectionToken that gets the current
Injector
forcreateInjector()
-style injectors.Requesting this token instead of
Injector
allowsStaticInjector
to be tree-shaken from a project.
variable INJECTOR_2
const INJECTOR_2: number;
variable Input
const Input: InputDecorator;
variable ITS_JUST_ANGULAR
const ITS_JUST_ANGULAR: boolean;
The existence of this constant (in this particular file) informs the Angular compiler that the current program is actually @angular/core, which needs to be compiled specially.
variable LOCALE_ID
const LOCALE_ID: InjectionToken<string>;
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.
See the [i18n guide](guide/i18n-common-locale-id) for more information.
### Example
import { LOCALE_ID } from '@angular/core';import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';import { AppModule } from './app/app.module';platformBrowserDynamic().bootstrapModule(AppModule, {providers: [{provide: LOCALE_ID, useValue: 'en-US' }]});
variable MOVED_VIEWS
const MOVED_VIEWS: number;
variable MULTIPLIER
const MULTIPLIER: string;
variable NATIVE
const NATIVE: number;
variable NEXT
const NEXT: number;
variable NgModule
const NgModule: NgModuleDecorator;
variable NO_ERRORS_SCHEMA
const NO_ERRORS_SCHEMA: SchemaMetadata;
Defines a schema that allows any property on any element.
This schema allows you to ignore the errors related to any unknown elements or properties in a template. The usage of this schema is generally discouraged because it prevents useful validation and may hide real errors in your template. Consider using the
CUSTOM_ELEMENTS_SCHEMA
instead.
variable NODES
const NODES: string;
variable NUM_ROOT_NODES
const NUM_ROOT_NODES: string;
variable ON_DESTROY_HOOKS
const ON_DESTROY_HOOKS: number;
variable Optional
const Optional: OptionalDecorator;
Optional decorator and metadata.
variable Output
const Output: OutputDecorator;
variable ɵALLOW_MULTIPLE_PLATFORMS
const ɵALLOW_MULTIPLE_PLATFORMS: InjectionToken<boolean>;
Internal token to indicate whether having multiple bootstrapped platform should be allowed (only one bootstrapped platform is allowed by default). This token helps to support SSR scenarios.
variable ɵDEFAULT_LOCALE_ID
const ɵDEFAULT_LOCALE_ID: string;
The locale id that the application is using by default (for translations and ICU expressions).
variable ɵdefaultIterableDiffers
const ɵdefaultIterableDiffers: IterableDiffers;
variable ɵdefaultKeyValueDiffers
const ɵdefaultKeyValueDiffers: KeyValueDiffers;
variable ɵENABLED_SSR_FEATURES
const ɵENABLED_SSR_FEATURES: InjectionToken<Set<string>>;
Internal token to collect all SSR-related features enabled for this application.
Note: the token is in
core
to let other packages register features (thecore
package is imported in other packages).
variable ɵglobal
const ɵglobal: any;
variable ɵINJECTOR_SCOPE
const ɵINJECTOR_SCOPE: InjectionToken<InjectorScope>;
An internal token whose presence in an injector indicates that the injector should treat itself as a root scoped injector when processing requests for unknown tokens which may indicate they are provided in the root scope.
variable ɵIS_HYDRATION_DOM_REUSE_ENABLED
const ɵIS_HYDRATION_DOM_REUSE_ENABLED: InjectionToken<boolean>;
Internal token that specifies whether DOM reuse logic during hydration is enabled.
variable ɵNG_COMP_DEF
const ɵNG_COMP_DEF: string;
variable ɵNG_DIR_DEF
const ɵNG_DIR_DEF: string;
variable ɵNG_ELEMENT_ID
const ɵNG_ELEMENT_ID: string;
If a directive is diPublic, bloomAdd sets a property on the type with this constant as the key and the directive's unique ID as the value. This allows us to map directives to their bloom filter bit for DI.
variable ɵNG_INJ_DEF
const ɵNG_INJ_DEF: string;
variable ɵNG_MOD_DEF
const ɵNG_MOD_DEF: string;
variable ɵNG_PIPE_DEF
const ɵNG_PIPE_DEF: string;
variable ɵNG_PROV_DEF
const ɵNG_PROV_DEF: string;
variable ɵNO_CHANGE
const ɵNO_CHANGE: ɵNO_CHANGE;
A special value which designates that a value has not changed.
variable ɵNOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR
const ɵNOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR: {};
variable ɵTESTABILITY
const ɵTESTABILITY: InjectionToken<Testability>;
Internal injection token that can used to access an instance of a Testability class.
This token acts as a bridge between the core bootstrap code and the
Testability
class. This is needed to ensure that there are no direct references to theTestability
class, so it can be tree-shaken away (if not referenced). For the environments/setups when theTestability
class should be available, this token is used to add a provider that references theTestability
class. Otherwise, only this token is retained in a bundle, but theTestability
class is not.
variable ɵTESTABILITY_GETTER
const ɵTESTABILITY_GETTER: InjectionToken<GetTestability>;
Internal injection token to retrieve Testability getter class instance.
variable ɵXSS_SECURITY_URL
const ɵXSS_SECURITY_URL: string;
URL for the XSS security documentation.
variable PACKAGE_ROOT_URL
const PACKAGE_ROOT_URL: InjectionToken<string>;
A [DI token](guide/glossary#di-token "DI token definition") that indicates the root directory of the application
variable PARENT
const PARENT: number;
variable Pipe
const Pipe: PipeDecorator;
variable PLATFORM_ID
const PLATFORM_ID: InjectionToken<Object>;
A token that indicates an opaque platform ID.
variable PLATFORM_INITIALIZER
const PLATFORM_INITIALIZER: InjectionToken<(() => void)[]>;
A function that is executed when a platform is initialized.
variable PREORDER_HOOK_FLAGS
const PREORDER_HOOK_FLAGS: number;
variable QUERIES
const QUERIES: number;
variable REACTIVE_HOST_BINDING_CONSUMER
const REACTIVE_HOST_BINDING_CONSUMER: number;
variable REACTIVE_TEMPLATE_CONSUMER
const REACTIVE_TEMPLATE_CONSUMER: number;
variable RENDERER
const RENDERER: number;
variable Self
const Self: SelfDecorator;
Self decorator and metadata.
variable SIGNAL
const SIGNAL: Symbol;
Symbol used to tell
Signal
s apart from other functions.This can be used to auto-unwrap signals in various cases, or to auto-wrap non-signal values.
variable SkipSelf
const SkipSelf: SkipSelfDecorator;
SkipSelf
decorator and metadata.
variable T_HOST
const T_HOST: number;
variable TEMPLATE_ID
const TEMPLATE_ID: string;
variable TEMPLATES
const TEMPLATES: string;
variable TRANSLATIONS
const TRANSLATIONS: InjectionToken<string>;
Use this token at bootstrap to provide the content of your translation file (
xtb
,xlf
orxlf2
) when you want to translate your application in another language.See the [i18n guide](guide/i18n-common-merge) for more information.
### Example
import { TRANSLATIONS } from '@angular/core';import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';import { AppModule } from './app/app.module';// content of your translation fileconst translations = '....';platformBrowserDynamic().bootstrapModule(AppModule, {providers: [{provide: TRANSLATIONS, useValue: translations }]});
variable TRANSLATIONS_FORMAT
const TRANSLATIONS_FORMAT: InjectionToken<string>;
Provide this token at bootstrap to set the format of your TRANSLATIONS:
xtb
,xlf
orxlf2
.See the [i18n guide](guide/i18n-common-merge) for more information.
### Example
import { TRANSLATIONS_FORMAT } from '@angular/core';import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';import { AppModule } from './app/app.module';platformBrowserDynamic().bootstrapModule(AppModule, {providers: [{provide: TRANSLATIONS_FORMAT, useValue: 'xlf' }]});
variable TVIEW
const TVIEW: number;
variable Type
const Type: FunctionConstructor;
Represents a type that a Component or other object is instances of.
An example of a
Type
isMyCustomComponent
class, which in JavaScript is represented by theMyCustomComponent
constructor function.
variable TYPE
const TYPE: number;
Special location which allows easy identification of type. If we have an array which was retrieved from the
LView
and that array hastrue
atTYPE
location, we know it isLContainer
.
variable VERSION
const VERSION: Version;
variable VIEW_REFS
const VIEW_REFS: number;
variable ViewChild
const ViewChild: ViewChildDecorator;
ViewChild decorator and metadata.
variable ViewChildren
const ViewChildren: ViewChildrenDecorator;
ViewChildren decorator and metadata.
Functions
function asNativeElements
asNativeElements: (debugEls: DebugElement[]) => any;
function assertInInjectionContext
assertInInjectionContext: (debugFn: Function) => void;
Asserts that the current stack frame is within an injection context and has access to
inject
.Parameter debugFn
a reference to the function making the assertion (used for the error message).
function assertPlatform
assertPlatform: (requiredToken: any) => PlatformRef;
Checks that there is currently a platform that contains the given token as a provider.
function computed
computed: <T>( computation: () => T, options?: CreateComputedOptions<T>) => Signal<T>;
Create a computed
Signal
which derives a reactive value from an expression.
function createComponent
createComponent: <C>( component: Type<C>, options: { environmentInjector: EnvironmentInjector; hostElement?: Element; elementInjector?: Injector; projectableNodes?: Node[][]; }) => ComponentRef<C>;
Creates a
ComponentRef
instance based on provided component type and a set of options.The example below demonstrates how the
createComponent
function can be used to create an instance of a ComponentRef dynamically and attach it to an ApplicationRef, so that it gets included into change detection cycles.Note: the example uses standalone components, but the function can also be used for non-standalone components (declared in an NgModule) as well.
@Component({standalone: true,template: `Hello {{ name }}!`})class HelloComponent {name = 'Angular';}@Component({standalone: true,template: `<div id="hello-component-host"></div>`})class RootComponent {}// Bootstrap an application.const applicationRef = await bootstrapApplication(RootComponent);// Locate a DOM node that would be used as a host.const host = document.getElementById('hello-component-host');// Get an `EnvironmentInjector` instance from the `ApplicationRef`.const environmentInjector = applicationRef.injector;// We can now create a `ComponentRef` instance.const componentRef = createComponent(HelloComponent, {host, environmentInjector});// Last step is to register the newly created ref using the `ApplicationRef` instance// to include the component view into change detection cycles.applicationRef.attachView(componentRef.hostView);Parameter component
Component class reference.
Parameter options
Set of options to use: *
environmentInjector
: AnEnvironmentInjector
instance to be used for the component, see additional info about it [here](/guide/standalone-components#environment-injectors). *hostElement
(optional): A DOM node that should act as a host node for the component. If not provided, Angular creates one based on the tag name used in the component selector (and falls back to usingdiv
if selector doesn't have tag name info). *elementInjector
(optional): AnElementInjector
instance, see additional info about it [here](/guide/hierarchical-dependency-injection#elementinjector). *projectableNodes
(optional): A list of DOM nodes that should be projected through [<ng-content>
](api/core/ng-content) of the new component instance.Returns
ComponentRef instance that represents a given Component.
function createEnvironmentInjector
createEnvironmentInjector: ( providers: Array<Provider | EnvironmentProviders>, parent: EnvironmentInjector, debugName?: string | null) => EnvironmentInjector;
Create a new environment injector.
Learn more about environment injectors in [this guide](guide/standalone-components#environment-injectors).
Parameter providers
An array of providers.
Parameter parent
A parent environment injector.
Parameter debugName
An optional name for this injector instance, which will be used in error messages.
function createNgModule
createNgModule: <T>( ngModule: Type<T>, parentInjector?: Injector) => NgModuleRef<T>;
Returns a new NgModuleRef instance based on the NgModule class and parent injector provided.
Parameter ngModule
NgModule class.
Parameter parentInjector
Optional injector instance to use as a parent for the module injector. If not provided,
NullInjector
will be used instead.Returns
NgModuleRef that represents an NgModule instance.
function createPlatform
createPlatform: (injector: Injector) => PlatformRef;
Creates a platform. Platforms must be created on launch using this function.
function createPlatformFactory
createPlatformFactory: ( parentPlatformFactory: (extraProviders?: StaticProvider[]) => PlatformRef, name: string, providers?: StaticProvider[]) => (extraProviders?: StaticProvider[]) => PlatformRef;
Creates a factory for a platform. Can be used to provide or override
Providers
specific to your application's runtime needs, such asPLATFORM_INITIALIZER
andPLATFORM_ID
.Parameter parentPlatformFactory
Another platform factory to modify. Allows you to compose factories to build up configurations that might be required by different libraries or parts of the application.
Parameter name
Identifies the new platform factory.
Parameter providers
A set of dependency providers for platforms created with the new factory.
function destroyPlatform
destroyPlatform: () => void;
Destroys the current Angular platform and all Angular applications on the page. Destroys all modules and listeners registered with the platform.
function effect
effect: ( effectFn: (onCleanup: EffectCleanupRegisterFn) => void, options?: CreateEffectOptions) => EffectRef;
Create a global
Effect
for the given reactive function.
function enableProdMode
enableProdMode: () => void;
Disable Angular's development mode, which turns off assertions and other checks within the framework.
One important assertion this disables verifies that a change detection pass does not result in additional changes to any bindings (also known as unidirectional data flow).
Using this method is discouraged as the Angular CLI will set production mode when using the
optimization
option.See Also
function forwardRef
forwardRef: (forwardRefFn: ForwardRefFn) => Type<any>;
Allows to refer to references which are not yet defined.
For instance,
forwardRef
is used when thetoken
which we need to refer to for the purposes of DI is declared, but not yet defined. It is also used when thetoken
which we use when creating a query is not yet defined.forwardRef
is also used to break circularities in standalone components imports.### Circular dependency example
### Circular standalone reference import example
@Component({standalone: true,imports: [ChildComponent],selector: 'app-parent',template: `<app-child [hideParent]="hideParent"></app-child>`,})export class ParentComponent {@Input() hideParent: boolean;}@Component({standalone: true,imports: [CommonModule, forwardRef(() => ParentComponent)],selector: 'app-child',template: `<app-parent *ngIf="!hideParent"></app-parent>`,})export class ChildComponent {@Input() hideParent: boolean;}
function getDebugNode
getDebugNode: (nativeNode: any) => DebugNode | null;
function getModuleFactory
getModuleFactory: (id: string) => NgModuleFactory<any>;
Returns the NgModuleFactory with the given id (specified using [@NgModule.id field](api/core/NgModule#id)), if it exists and has been loaded. Factories for NgModules that do not specify an
id
cannot be retrieved. Throws if an NgModule cannot be found.Deprecated
Use
getNgModuleById
instead.
function getNgModuleById
getNgModuleById: <T>(id: string) => Type<T>;
Returns the NgModule class with the given id (specified using [@NgModule.id field](api/core/NgModule#id)), if it exists and has been loaded. Classes for NgModules that do not specify an
id
cannot be retrieved. Throws if an NgModule cannot be found.
function getPlatform
getPlatform: () => PlatformRef | null;
Returns the current platform.
function importProvidersFrom
importProvidersFrom: ( ...sources: ImportProvidersSource[]) => EnvironmentProviders;
Collects providers from all NgModules and standalone components, including transitively imported ones.
Providers extracted via
importProvidersFrom
are only usable in an application injector or another environment injector (such as a route injector). They should not be used in component providers.More information about standalone components can be found in [this guide](guide/standalone-components).
The results of the
importProvidersFrom
call can be used in thebootstrapApplication
call:await bootstrapApplication(RootComponent, {providers: [importProvidersFrom(NgModuleOne, NgModuleTwo)]});You can also use the
importProvidersFrom
results in theproviders
field of a route, when a standalone component is used:export const ROUTES: Route[] = [{path: 'foo',providers: [importProvidersFrom(NgModuleOne, NgModuleTwo)],component: YourStandaloneComponent}];Returns
Collected providers from the specified list of types.
function inject
inject: { <T>(token: ProviderToken<T>): T; <T>(token: ProviderToken<T>, flags?: InjectFlags): T; <T>(token: ProviderToken<T>, options: InjectOptions & { optional?: false }): T; <T>(token: ProviderToken<T>, options: InjectOptions): T;};
Parameter token
A token that represents a dependency that should be injected.
Returns
the injected value if operation is successful,
null
otherwise.Throws
if called outside of a supported context.
Parameter token
A token that represents a dependency that should be injected.
Parameter flags
Control how injection is executed. The flags correspond to injection strategies that can be specified with parameter decorators
@Host
,@Self
,@SkipSelf
, and@Optional
.Returns
the injected value if operation is successful,
null
otherwise.Throws
if called outside of a supported context.
Deprecated
prefer an options object instead of
InjectFlags
Parameter token
A token that represents a dependency that should be injected.
Parameter options
Control how injection is executed. Options correspond to injection strategies that can be specified with parameter decorators
@Host
,@Self
,@SkipSelf
, and@Optional
.Returns
the injected value if operation is successful.
Throws
if called outside of a supported context, or if the token is not found.
Parameter token
A token that represents a dependency that should be injected.
Parameter options
Control how injection is executed. Options correspond to injection strategies that can be specified with parameter decorators
@Host
,@Self
,@SkipSelf
, and@Optional
.Returns
the injected value if operation is successful,
null
if the token is not found and optional injection has been requested.Throws
if called outside of a supported context, or if the token is not found and optional injection was not requested.
function isDevMode
isDevMode: () => boolean;
Returns whether Angular is in development mode.
By default, this is true, unless
enableProdMode
is invoked prior to calling this method or the application is built using the Angular CLI with theoptimization
option.See Also
function isSignal
isSignal: (value: unknown) => value is Signal<unknown>;
Checks if the given
value
is a reactiveSignal
.
function isStandalone
isStandalone: (type: Type<unknown>) => boolean;
Checks whether a given Component, Directive or Pipe is marked as standalone. This will return false if passed anything other than a Component, Directive, or Pipe class See [this guide](/guide/standalone-components) for additional information:
Parameter type
A reference to a Component, Directive or Pipe.
function makeEnvironmentProviders
makeEnvironmentProviders: ( providers: (Provider | EnvironmentProviders)[]) => EnvironmentProviders;
Wrap an array of
Provider
s intoEnvironmentProviders
, preventing them from being accidentally referenced in `@Component in a component injector.
function makeStateKey
makeStateKey: <T = void>(key: string) => StateKey<T>;
Create a
StateKey<T>
that can be used to store value of type T withTransferState
.Example:
const COUNTER_KEY = makeStateKey<number>('counter');let value = 10;transferState.set(COUNTER_KEY, value);
function mergeApplicationConfig
mergeApplicationConfig: (...configs: ApplicationConfig[]) => ApplicationConfig;
Merge multiple application configurations from left to right.
Parameter configs
Two or more configurations to be merged.
Returns
A merged [ApplicationConfig](api/core/ApplicationConfig).
function ɵ_sanitizeHtml
ɵ_sanitizeHtml: ( defaultDoc: any, unsafeHtmlInput: string) => TrustedHTML | string;
Sanitizes the given unsafe, untrusted HTML fragment, and returns HTML text that is safe to add to the DOM in a browser environment.
function ɵ_sanitizeUrl
ɵ_sanitizeUrl: (url: string) => string;
function ɵallowSanitizationBypassAndThrow
ɵallowSanitizationBypassAndThrow: { (value: any, type: ɵBypassType.Html): value is ɵSafeHtml; (value: any, type: ɵBypassType.ResourceUrl): value is ɵSafeResourceUrl; (value: any, type: ɵBypassType.Script): value is ɵSafeScript; (value: any, type: ɵBypassType.Style): value is ɵSafeStyle; (value: any, type: ɵBypassType.Url): value is ɵSafeUrl; (value: any, type: ɵBypassType): boolean;};
function ɵannotateForHydration
ɵannotateForHydration: (appRef: ApplicationRef, doc: Document) => void;
Annotates all components bootstrapped in a given ApplicationRef with info needed for hydration.
Parameter appRef
An instance of an ApplicationRef.
Parameter doc
A reference to the current Document instance.
function ɵbypassSanitizationTrustHtml
ɵbypassSanitizationTrustHtml: (trustedHtml: string) => ɵSafeHtml;
Mark
html
string as trusted.This function wraps the trusted string in
String
and brands it in a way which makes it recognizable to htmlSanitizer to be trusted implicitly.Parameter trustedHtml
html
string which needs to be implicitly trusted.Returns
a
html
which has been branded to be implicitly trusted.
function ɵbypassSanitizationTrustResourceUrl
ɵbypassSanitizationTrustResourceUrl: ( trustedResourceUrl: string) => ɵSafeResourceUrl;
Mark
url
string as trusted.This function wraps the trusted string in
String
and brands it in a way which makes it recognizable to resourceUrlSanitizer to be trusted implicitly.Parameter trustedResourceUrl
url
string which needs to be implicitly trusted.Returns
a
url
which has been branded to be implicitly trusted.
function ɵbypassSanitizationTrustScript
ɵbypassSanitizationTrustScript: (trustedScript: string) => ɵSafeScript;
Mark
script
string as trusted.This function wraps the trusted string in
String
and brands it in a way which makes it recognizable to scriptSanitizer to be trusted implicitly.Parameter trustedScript
script
string which needs to be implicitly trusted.Returns
a
script
which has been branded to be implicitly trusted.
function ɵbypassSanitizationTrustStyle
ɵbypassSanitizationTrustStyle: (trustedStyle: string) => ɵSafeStyle;
Mark
style
string as trusted.This function wraps the trusted string in
String
and brands it in a way which makes it recognizable to styleSanitizer to be trusted implicitly.Parameter trustedStyle
style
string which needs to be implicitly trusted.Returns
a
style
hich has been branded to be implicitly trusted.
function ɵbypassSanitizationTrustUrl
ɵbypassSanitizationTrustUrl: (trustedUrl: string) => ɵSafeUrl;
Mark
url
string as trusted.This function wraps the trusted string in
String
and brands it in a way which makes it recognizable to urlSanitizer to be trusted implicitly.Parameter trustedUrl
url
string which needs to be implicitly trusted.Returns
a
url
which has been branded to be implicitly trusted.
function ɵclearResolutionOfComponentResourcesQueue
ɵclearResolutionOfComponentResourcesQueue: () => Map<Type<any>, Component>;
function ɵcoerceToBoolean
ɵcoerceToBoolean: (value: unknown) => boolean;
Coerces a value (typically a string) to a boolean.
function ɵcompileComponent
ɵcompileComponent: (type: Type<any>, metadata: Component) => void;
Compile an Angular component according to its decorator metadata, and patch the resulting component def (ɵcmp) onto the component type.
Compilation may be asynchronous (due to the need to resolve URLs for the component template or other resources, for example). In the event that compilation is not immediate,
compileComponent
will enqueue resource resolution into a global queue and will fail to return theɵcmp
until the global queue has been resolved with a call toresolveComponentResources
.
function ɵcompileDirective
ɵcompileDirective: (type: Type<any>, directive: Directive | null) => void;
Compile an Angular directive according to its decorator metadata, and patch the resulting directive def onto the component type.
In the event that compilation is not immediate,
compileDirective
will return aPromise
which will resolve when compilation completes and the directive becomes usable.
function ɵcompileNgModule
ɵcompileNgModule: (moduleType: Type<any>, ngModule?: NgModule) => void;
Compiles a module in JIT mode.
This function automatically gets called when a class has a
@NgModule
decorator.
function ɵcompileNgModuleDefs
ɵcompileNgModuleDefs: ( moduleType: ɵNgModuleType, ngModule: NgModule, allowDuplicateDeclarationsInRoot?: boolean) => void;
Compiles and adds the
ɵmod
,ɵfac
andɵinj
properties to the module class.It's possible to compile a module via this API which will allow duplicate declarations in its root.
function ɵcompileNgModuleFactory
ɵcompileNgModuleFactory: <M>( injector: Injector, options: CompilerOptions, moduleType: Type<M>) => Promise<NgModuleFactory<M>>;
function ɵcompilePipe
ɵcompilePipe: (type: Type<any>, meta: Pipe) => void;
function ɵconvertToBitFlags
ɵconvertToBitFlags: ( flags: InjectOptions | InjectFlags | undefined) => InjectFlags | undefined;
function ɵcreateInjector
ɵcreateInjector: ( defType: any, parent?: Injector | null, additionalProviders?: StaticProvider[] | null, name?: string) => Injector;
Create a new
Injector
which is configured using adefType
ofInjectorType<any>
s.
function ɵdetectChanges
ɵdetectChanges: (component: {}) => void;
Synchronously perform change detection on a component (and possibly its sub-components).
This function triggers change detection in a synchronous way on a component.
Parameter component
The component which the change detection should be performed on.
function ɵdevModeEqual
ɵdevModeEqual: (a: any, b: any) => boolean;
function ɵfindLocaleData
ɵfindLocaleData: (locale: string) => any;
Finds the locale data for a given locale.
Parameter locale
The locale code.
Returns
The locale data.
See Also
[Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)
function ɵflushModuleScopingQueueAsMuchAsPossible
ɵflushModuleScopingQueueAsMuchAsPossible: () => void;
Loops over queued module definitions, if a given module definition has all of its declarations resolved, it dequeues that module definition and sets the scope on its declarations.
function ɵformatRuntimeError
ɵformatRuntimeError: <T extends number = RuntimeErrorCode>( code: T, message: null | false | string) => string;
Called to format a runtime error. See additional info on the
message
argument type in theRuntimeError
class description.
function ɵgetDebugNode
ɵgetDebugNode: (nativeNode: any) => DebugNode | null;
function ɵgetDirectives
ɵgetDirectives: (node: Node) => {}[];
Retrieves directive instances associated with a given DOM node. Does not include component instances.
Given the following DOM structure:
<app-root><button my-button></button><my-comp></my-comp></app-root>Calling
getDirectives
on<button>
will return an array with an instance of theMyButton
directive that is associated with the DOM node.Calling
getDirectives
on<my-comp>
will return an empty array.Parameter node
DOM node for which to get the directives.
Returns
Array of directives associated with the node.
ng
function ɵgetHostElement
ɵgetHostElement: (componentOrDirective: {}) => Element;
Retrieves the host element of a component or directive instance. The host element is the DOM element that matched the selector of the directive.
Parameter componentOrDirective
Component or directive instance for which the host element should be retrieved.
Returns
Host element of the target.
ng
function ɵgetInjectableDef
ɵgetInjectableDef: <T>(type: any) => ɵɵInjectableDeclaration<T> | null;
Read the injectable def (
ɵprov
) fortype
in a way which is immune to accidentally reading inherited value.Parameter type
A type which may have its own (non-inherited)
ɵprov
.
function ɵgetLContext
ɵgetLContext: (target: any) => ɵLContext | null;
Returns the matching
LContext
data for a given DOM node, directive or component instance.This function will examine the provided DOM element, component, or directive instance's monkey-patched property to derive the
LContext
data. Once called then the monkey-patched value will be that of the newly createdLContext
.If the monkey-patched value is the
LView
instance then the context value for that target will be created and the monkey-patch reference will be updated. Therefore when this function is called it may mutate the provided element's, component's or any of the associated directive's monkey-patch values.If the monkey-patch value is not detected then the code will walk up the DOM until an element is found which contains a monkey-patch reference. When that occurs then the provided element will be updated with a new context (which is then returned). If the monkey-patch value is not detected for a component/directive instance then it will throw an error (all components and directives should be automatically monkey-patched by ivy).
Parameter target
Component, Directive or DOM Node.
function ɵgetLocaleCurrencyCode
ɵgetLocaleCurrencyCode: (locale: string) => string | null;
Retrieves the default currency code for the given locale.
The default is defined as the first currency which is still in use.
Parameter locale
The code of the locale whose currency code we want.
Returns
The code of the default currency for the given locale.
function ɵgetLocalePluralCase
ɵgetLocalePluralCase: (locale: string) => (value: number) => number;
Retrieves the plural function used by ICU expressions to determine the plural case to use for a given locale.
Parameter locale
A locale code for the locale format rules to use.
Returns
The plural function for the locale.
See Also
NgPlural
[Internationalization (i18n) Guide](/guide/i18n-overview)
function ɵgetSanitizationBypassType
ɵgetSanitizationBypassType: (value: any) => ɵBypassType | null;
function ɵgetUnknownElementStrictMode
ɵgetUnknownElementStrictMode: () => boolean;
Gets the current value of the strict mode.
function ɵgetUnknownPropertyStrictMode
ɵgetUnknownPropertyStrictMode: () => boolean;
Gets the current value of the strict mode.
function ɵinjectChangeDetectorRef
ɵinjectChangeDetectorRef: (flags: InjectFlags) => ChangeDetectorRef;
Returns a ChangeDetectorRef (a.k.a. a ViewRef)
function ɵinternalCreateApplication
ɵinternalCreateApplication: (config: { rootComponent?: Type<unknown>; appProviders?: Array<Provider | EnvironmentProviders>; platformProviders?: Provider[];}) => Promise<ApplicationRef>;
Internal create application API that implements the core application creation logic and optional bootstrap logic.
Platforms (such as
platform-browser
) may require different set of application and platform providers for an application to function correctly. As a result, platforms may use this function internally and supply the necessary providers during the bootstrap, while exposing platform-specific APIs as a part of their public API.Returns
A promise that returns an
ApplicationRef
instance once resolved.
function ɵisBoundToModule
ɵisBoundToModule: <C>(cf: ComponentFactory<C>) => boolean;
function ɵisEnvironmentProviders
ɵisEnvironmentProviders: ( value: Provider | EnvironmentProviders | ɵInternalEnvironmentProviders) => value is ɵInternalEnvironmentProviders;
function ɵisInjectable
ɵisInjectable: (type: any) => boolean;
function ɵisNgModule
ɵisNgModule: <T>(value: Type<T>) => value is Type<T> & { ɵmod: ɵNgModuleDef<T> };
function ɵisPromise
ɵisPromise: <T = any>(obj: any) => obj is Promise<T>;
Determine if the argument is shaped like a Promise
function ɵisSubscribable
ɵisSubscribable: <T>(obj: any | Subscribable<T>) => obj is Subscribable<T>;
Determine if the argument is a Subscribable
function ɵLifecycleHooksFeature
ɵLifecycleHooksFeature: () => void;
Used to enable lifecycle hooks on the root component.
Include this feature when calling
renderComponent
if the root component you are rendering has lifecycle hooks defined. Otherwise, the hooks won't be called properly.Example:
renderComponent(AppComponent, {hostFeatures: [LifecycleHooksFeature]});
function ɵnoSideEffects
ɵnoSideEffects: <T>(fn: () => T) => T;
Convince closure compiler that the wrapped function has no side-effects.
Closure compiler always assumes that
toString
has no side-effects. We use this quirk to allow us to execute a function but have closure compiler mark the call as no-side-effects. It is important that the return value for thenoSideEffects
function be assigned to something which is retained otherwise the call tonoSideEffects
will be removed by closure compiler.
function ɵɵadvance
ɵɵadvance: (delta: number) => void;
Advances to an element for later binding instructions.
Used in conjunction with instructions like property to act on elements with specified indices, for example those created with element or elementStart.
(rf: RenderFlags, ctx: any) => {if (rf & 1) {text(0, 'Hello');text(1, 'Goodbye')element(2, 'div');}if (rf & 2) {advance(2); // Advance twice to the <div>.property('title', 'test');}}Parameter delta
Number of elements to advance forwards by.
function ɵɵattribute
ɵɵattribute: ( name: string, value: any, sanitizer?: SanitizerFn | null, namespace?: string) => typeof ɵɵattribute;
Updates the value of or removes a bound attribute on an Element.
Used in the case of
[attr.title]="value"
Parameter name
name The name of the attribute.
Parameter value
value The attribute is removed when value is
null
orundefined
. Otherwise the attribute value is set to the stringified value.Parameter sanitizer
An optional function used to sanitize the value.
Parameter namespace
Optional namespace to use when setting the attribute.
function ɵɵattributeInterpolate1
ɵɵattributeInterpolate1: ( attrName: string, prefix: string, v0: any, suffix: string, sanitizer?: SanitizerFn, namespace?: string) => typeof ɵɵattributeInterpolate1;
Update an interpolated attribute on an element with single bound value surrounded by text.
Used when the value passed to a property has 1 interpolated value in it:
<div attr.title="prefix{{v0}}suffix"></div>Its compiled representation is::
ɵɵattributeInterpolate1('title', 'prefix', v0, 'suffix');Parameter attrName
The name of the attribute to update
Parameter prefix
Static value used for concatenation only.
Parameter v0
Value checked for change.
Parameter suffix
Static value used for concatenation only.
Parameter sanitizer
An optional sanitizer function
Returns
itself, so that it may be chained.
function ɵɵattributeInterpolate2
ɵɵattributeInterpolate2: ( attrName: string, prefix: string, v0: any, i0: string, v1: any, suffix: string, sanitizer?: SanitizerFn, namespace?: string) => typeof ɵɵattributeInterpolate2;
Update an interpolated attribute on an element with 2 bound values surrounded by text.
Used when the value passed to a property has 2 interpolated values in it:
<div attr.title="prefix{{v0}}-{{v1}}suffix"></div>Its compiled representation is::
ɵɵattributeInterpolate2('title', 'prefix', v0, '-', v1, 'suffix');Parameter attrName
The name of the attribute to update
Parameter prefix
Static value used for concatenation only.
Parameter v0
Value checked for change.
Parameter i0
Static value used for concatenation only.
Parameter v1
Value checked for change.
Parameter suffix
Static value used for concatenation only.
Parameter sanitizer
An optional sanitizer function
Returns
itself, so that it may be chained.
function ɵɵattributeInterpolate3
ɵɵattributeInterpolate3: ( attrName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, suffix: string, sanitizer?: SanitizerFn, namespace?: string) => typeof ɵɵattributeInterpolate3;
Update an interpolated attribute on an element with 3 bound values surrounded by text.
Used when the value passed to a property has 3 interpolated values in it:
<div attr.title="prefix{{v0}}-{{v1}}-{{v2}}suffix"></div>Its compiled representation is::
ɵɵattributeInterpolate3('title', 'prefix', v0, '-', v1, '-', v2, 'suffix');Parameter attrName
The name of the attribute to update
Parameter prefix
Static value used for concatenation only.
Parameter v0
Value checked for change.
Parameter i0
Static value used for concatenation only.
Parameter v1
Value checked for change.
Parameter i1
Static value used for concatenation only.
Parameter v2
Value checked for change.
Parameter suffix
Static value used for concatenation only.
Parameter sanitizer
An optional sanitizer function
Returns
itself, so that it may be chained.
function ɵɵattributeInterpolate4
ɵɵattributeInterpolate4: ( attrName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, suffix: string, sanitizer?: SanitizerFn, namespace?: string) => typeof ɵɵattributeInterpolate4;
Update an interpolated attribute on an element with 4 bound values surrounded by text.
Used when the value passed to a property has 4 interpolated values in it:
<div attr.title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix"></div>Its compiled representation is::
ɵɵattributeInterpolate4('title', 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');Parameter attrName
The name of the attribute to update
Parameter prefix
Static value used for concatenation only.
Parameter v0
Value checked for change.
Parameter i0
Static value used for concatenation only.
Parameter v1
Value checked for change.
Parameter i1
Static value used for concatenation only.
Parameter v2
Value checked for change.
Parameter i2
Static value used for concatenation only.
Parameter v3
Value checked for change.
Parameter suffix
Static value used for concatenation only.
Parameter sanitizer
An optional sanitizer function
Returns
itself, so that it may be chained.
function ɵɵattributeInterpolate5
ɵɵattributeInterpolate5: ( attrName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, suffix: string, sanitizer?: SanitizerFn, namespace?: string) => typeof ɵɵattributeInterpolate5;
Update an interpolated attribute on an element with 5 bound values surrounded by text.
Used when the value passed to a property has 5 interpolated values in it:
<div attr.title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix"></div>Its compiled representation is::
ɵɵattributeInterpolate5('title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');Parameter attrName
The name of the attribute to update
Parameter prefix
Static value used for concatenation only.
Parameter v0
Value checked for change.
Parameter i0
Static value used for concatenation only.
Parameter v1
Value checked for change.
Parameter i1
Static value used for concatenation only.
Parameter v2
Value checked for change.
Parameter i2
Static value used for concatenation only.
Parameter v3
Value checked for change.
Parameter i3
Static value used for concatenation only.
Parameter v4
Value checked for change.
Parameter suffix
Static value used for concatenation only.
Parameter sanitizer
An optional sanitizer function
Returns
itself, so that it may be chained.
function ɵɵattributeInterpolate6
ɵɵattributeInterpolate6: ( attrName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, i4: string, v5: any, suffix: string, sanitizer?: SanitizerFn, namespace?: string) => typeof ɵɵattributeInterpolate6;
Update an interpolated attribute on an element with 6 bound values surrounded by text.
Used when the value passed to a property has 6 interpolated values in it:
<div attr.title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix"></div>Its compiled representation is::
ɵɵattributeInterpolate6('title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');Parameter attrName
The name of the attribute to update
Parameter prefix
Static value used for concatenation only.
Parameter v0
Value checked for change.
Parameter i0
Static value used for concatenation only.
Parameter v1
Value checked for change.
Parameter i1
Static value used for concatenation only.
Parameter v2
Value checked for change.
Parameter i2
Static value used for concatenation only.
Parameter v3
Value checked for change.
Parameter i3
Static value used for concatenation only.
Parameter v4
Value checked for change.
Parameter i4
Static value used for concatenation only.
Parameter v5
Value checked for change.
Parameter suffix
Static value used for concatenation only.
Parameter sanitizer
An optional sanitizer function
Returns
itself, so that it may be chained.
function ɵɵattributeInterpolate7
ɵɵattributeInterpolate7: ( attrName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, suffix: string, sanitizer?: SanitizerFn, namespace?: string) => typeof ɵɵattributeInterpolate7;
Update an interpolated attribute on an element with 7 bound values surrounded by text.
Used when the value passed to a property has 7 interpolated values in it:
<div attr.title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix"></div>Its compiled representation is::
ɵɵattributeInterpolate7('title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');Parameter attrName
The name of the attribute to update
Parameter prefix
Static value used for concatenation only.
Parameter v0
Value checked for change.
Parameter i0
Static value used for concatenation only.
Parameter v1
Value checked for change.
Parameter i1
Static value used for concatenation only.
Parameter v2
Value checked for change.
Parameter i2
Static value used for concatenation only.
Parameter v3
Value checked for change.
Parameter i3
Static value used for concatenation only.
Parameter v4
Value checked for change.
Parameter i4
Static value used for concatenation only.
Parameter v5
Value checked for change.
Parameter i5
Static value used for concatenation only.
Parameter v6
Value checked for change.
Parameter suffix
Static value used for concatenation only.
Parameter sanitizer
An optional sanitizer function
Returns
itself, so that it may be chained.
function ɵɵattributeInterpolate8
ɵɵattributeInterpolate8: ( attrName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, i6: string, v7: any, suffix: string, sanitizer?: SanitizerFn, namespace?: string) => typeof ɵɵattributeInterpolate8;
Update an interpolated attribute on an element with 8 bound values surrounded by text.
Used when the value passed to a property has 8 interpolated values in it:
<div attr.title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix"></div>Its compiled representation is::
ɵɵattributeInterpolate8('title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');Parameter attrName
The name of the attribute to update
Parameter prefix
Static value used for concatenation only.
Parameter v0
Value checked for change.
Parameter i0
Static value used for concatenation only.
Parameter v1
Value checked for change.
Parameter i1
Static value used for concatenation only.
Parameter v2
Value checked for change.
Parameter i2
Static value used for concatenation only.
Parameter v3
Value checked for change.
Parameter i3
Static value used for concatenation only.
Parameter v4
Value checked for change.
Parameter i4
Static value used for concatenation only.
Parameter v5
Value checked for change.
Parameter i5
Static value used for concatenation only.
Parameter v6
Value checked for change.
Parameter i6
Static value used for concatenation only.
Parameter v7
Value checked for change.
Parameter suffix
Static value used for concatenation only.
Parameter sanitizer
An optional sanitizer function
Returns
itself, so that it may be chained.
function ɵɵattributeInterpolateV
ɵɵattributeInterpolateV: ( attrName: string, values: any[], sanitizer?: SanitizerFn, namespace?: string) => typeof ɵɵattributeInterpolateV;
Update an interpolated attribute on an element with 9 or more bound values surrounded by text.
Used when the number of interpolated values exceeds 8.
<divtitle="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix"></div>Its compiled representation is::
ɵɵattributeInterpolateV('title', ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,'suffix']);Parameter attrName
The name of the attribute to update.
Parameter values
The collection of values and the strings in-between those values, beginning with a string prefix and ending with a string suffix. (e.g.
['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']
)Parameter sanitizer
An optional sanitizer function
Returns
itself, so that it may be chained.
function ɵɵclassMap
ɵɵclassMap: (classes: string | { [className: string]: boolean }) => void;
Update class bindings using an object literal or class-string on an element.
This instruction is meant to apply styling via the
[class]="exp"
template bindings. When classes are applied to the element they will then be updated with respect to any styles/classes set viaclassProp
. If any classes are set to falsy then they will be removed from the element.Note that the styling instruction will not be applied until
stylingApply
is called. Note that this will the provided classMap value to the host element if this function is called within a host binding.Parameter classes
A key/value map or string of CSS classes that will be added to the given element. Any missing classes (that have already been applied to the element beforehand) will be removed (unset) from the element's list of CSS classes.
function ɵɵclassMapInterpolate1
ɵɵclassMapInterpolate1: (prefix: string, v0: any, suffix: string) => void;
Update an interpolated class on an element with single bound value surrounded by text.
Used when the value passed to a property has 1 interpolated value in it:
<div class="prefix{{v0}}suffix"></div>Its compiled representation is:
ɵɵclassMapInterpolate1('prefix', v0, 'suffix');Parameter prefix
Static value used for concatenation only.
Parameter v0
Value checked for change.
Parameter suffix
Static value used for concatenation only.
function ɵɵclassMapInterpolate2
ɵɵclassMapInterpolate2: ( prefix: string, v0: any, i0: string, v1: any, suffix: string) => void;
Update an interpolated class on an element with 2 bound values surrounded by text.
Used when the value passed to a property has 2 interpolated values in it:
<div class="prefix{{v0}}-{{v1}}suffix"></div>Its compiled representation is:
ɵɵclassMapInterpolate2('prefix', v0, '-', v1, 'suffix');Parameter prefix
Static value used for concatenation only.
Parameter v0
Value checked for change.
Parameter i0
Static value used for concatenation only.
Parameter v1
Value checked for change.
Parameter suffix
Static value used for concatenation only.
function ɵɵclassMapInterpolate3
ɵɵclassMapInterpolate3: ( prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, suffix: string) => void;
Update an interpolated class on an element with 3 bound values surrounded by text.
Used when the value passed to a property has 3 interpolated values in it:
<div class="prefix{{v0}}-{{v1}}-{{v2}}suffix"></div>Its compiled representation is:
ɵɵclassMapInterpolate3('prefix', v0, '-', v1, '-', v2, 'suffix');Parameter prefix
Static value used for concatenation only.
Parameter v0
Value checked for change.
Parameter i0
Static value used for concatenation only.
Parameter v1
Value checked for change.
Parameter i1
Static value used for concatenation only.
Parameter v2
Value checked for change.
Parameter suffix
Static value used for concatenation only.
function ɵɵclassMapInterpolate4
ɵɵclassMapInterpolate4: ( prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, suffix: string) => void;
Update an interpolated class on an element with 4 bound values surrounded by text.
Used when the value passed to a property has 4 interpolated values in it:
<div class="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix"></div>Its compiled representation is:
ɵɵclassMapInterpolate4('prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');Parameter prefix
Static value used for concatenation only.
Parameter v0
Value checked for change.
Parameter i0
Static value used for concatenation only.
Parameter v1
Value checked for change.
Parameter i1
Static value used for concatenation only.
Parameter v2
Value checked for change.
Parameter i2
Static value used for concatenation only.
Parameter v3
Value checked for change.
Parameter suffix
Static value used for concatenation only.
function ɵɵclassMapInterpolate5
ɵɵclassMapInterpolate5: ( prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, suffix: string) => void;
Update an interpolated class on an element with 5 bound values surrounded by text.
Used when the value passed to a property has 5 interpolated values in it:
<div class="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix"></div>Its compiled representation is:
ɵɵclassMapInterpolate5('prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');Parameter prefix
Static value used for concatenation only.
Parameter v0
Value checked for change.
Parameter i0
Static value used for concatenation only.
Parameter v1
Value checked for change.
Parameter i1
Static value used for concatenation only.
Parameter v2
Value checked for change.
Parameter i2
Static value used for concatenation only.
Parameter v3
Value checked for change.
Parameter i3
Static value used for concatenation only.
Parameter v4
Value checked for change.
Parameter suffix
Static value used for concatenation only.
function ɵɵclassMapInterpolate6
ɵɵclassMapInterpolate6: ( prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, i4: string, v5: any, suffix: string) => void;
Update an interpolated class on an element with 6 bound values surrounded by text.
Used when the value passed to a property has 6 interpolated values in it:
<div class="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix"></div>Its compiled representation is:
ɵɵclassMapInterpolate6('prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');Parameter prefix
Static value used for concatenation only.
Parameter v0
Value checked for change.
Parameter i0
Static value used for concatenation only.
Parameter v1
Value checked for change.
Parameter i1
Static value used for concatenation only.
Parameter v2
Value checked for change.
Parameter i2
Static value used for concatenation only.
Parameter v3
Value checked for change.
Parameter i3
Static value used for concatenation only.
Parameter v4
Value checked for change.
Parameter i4
Static value used for concatenation only.
Parameter v5
Value checked for change.
Parameter suffix
Static value used for concatenation only.
function ɵɵclassMapInterpolate7
ɵɵclassMapInterpolate7: ( prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, suffix: string) => void;
Update an interpolated class on an element with 7 bound values surrounded by text.
Used when the value passed to a property has 7 interpolated values in it:
<div class="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix"></div>Its compiled representation is:
ɵɵclassMapInterpolate7('prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');Parameter prefix
Static value used for concatenation only.
Parameter v0
Value checked for change.
Parameter i0
Static value used for concatenation only.
Parameter v1
Value checked for change.
Parameter i1
Static value used for concatenation only.
Parameter v2
Value checked for change.
Parameter i2
Static value used for concatenation only.
Parameter v3
Value checked for change.
Parameter i3
Static value used for concatenation only.
Parameter v4
Value checked for change.
Parameter i4
Static value used for concatenation only.
Parameter v5
Value checked for change.
Parameter i5
Static value used for concatenation only.
Parameter v6
Value checked for change.
Parameter suffix
Static value used for concatenation only.
function ɵɵclassMapInterpolate8
ɵɵclassMapInterpolate8: ( prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, i6: string, v7: any, suffix: string) => void;
Update an interpolated class on an element with 8 bound values surrounded by text.
Used when the value passed to a property has 8 interpolated values in it:
<div class="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix"></div>Its compiled representation is:
ɵɵclassMapInterpolate8('prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');Parameter prefix
Static value used for concatenation only.
Parameter v0
Value checked for change.
Parameter i0
Static value used for concatenation only.
Parameter v1
Value checked for change.
Parameter i1
Static value used for concatenation only.
Parameter v2
Value checked for change.
Parameter i2
Static value used for concatenation only.
Parameter v3
Value checked for change.
Parameter i3
Static value used for concatenation only.
Parameter v4
Value checked for change.
Parameter i4
Static value used for concatenation only.
Parameter v5
Value checked for change.
Parameter i5
Static value used for concatenation only.
Parameter v6
Value checked for change.
Parameter i6
Static value used for concatenation only.
Parameter v7
Value checked for change.
Parameter suffix
Static value used for concatenation only.
function ɵɵclassMapInterpolateV
ɵɵclassMapInterpolateV: (values: any[]) => void;
Update an interpolated class on an element with 9 or more bound values surrounded by text.
Used when the number of interpolated values exceeds 8.
<divclass="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix"></div>Its compiled representation is:
ɵɵclassMapInterpolateV(['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,'suffix']);.
Parameter values
The collection of values and the strings in-between those values, beginning with a string prefix and ending with a string suffix. (e.g.
['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']
)
function ɵɵclassProp
ɵɵclassProp: ( className: string, value: boolean | undefined | null) => typeof ɵɵclassProp;
Update a class binding on an element with the provided value.
This instruction is meant to handle the
[class.foo]="exp"
case and, therefore, the class binding itself must already be allocated usingstyling
within the creation block.Parameter prop
A valid CSS class (only one).
Parameter value
A true/false value which will turn the class on or off.
Note that this will apply the provided class value to the host element if this function is called within a host binding function.
function ɵɵcontentQuery
ɵɵcontentQuery: <T>( directiveIndex: number, predicate: ProviderToken<unknown> | string[], flags: QueryFlags, read?: any) => void;
Registers a QueryList, associated with a content query, for later refresh (part of a view refresh).
Parameter directiveIndex
Current directive index
Parameter predicate
The type for which the query will search
Parameter flags
Flags associated with the query
Parameter read
What to save in the query
Returns
QueryList
function ɵɵCopyDefinitionFeature
ɵɵCopyDefinitionFeature: ( definition: ɵDirectiveDef<any> | ɵComponentDef<any>) => void;
Copies the fields not handled by the
ɵɵInheritDefinitionFeature
from the supertype of a definition.This exists primarily to support ngcc migration of an existing View Engine pattern, where an entire decorator is inherited from a parent to a child class. When ngcc detects this case, it generates a skeleton definition on the child class, and applies this feature.
The
ɵɵCopyDefinitionFeature
then copies any needed fields from the parent class' definition, including things like the component template function.Parameter definition
The definition of a child class which inherits from a parent class with its own definition.
function ɵɵdefineComponent
ɵɵdefineComponent: <T>( componentDefinition: ComponentDefinition<T>) => Mutable<ɵComponentDef<any>, keyof ɵComponentDef<any>>;
Create a component definition object.
# Example
class MyComponent {// Generated by Angular Template Compiler// [Symbol] syntax will not be supported by TypeScript until v2.7static ɵcmp = defineComponent({...});}
function ɵɵdefineDirective
ɵɵdefineDirective: <T>( directiveDefinition: DirectiveDefinition<T>) => Mutable<ɵDirectiveDef<any>, keyof ɵDirectiveDef<any>>;
Create a directive definition object.
# Example
class MyDirective {// Generated by Angular Template Compiler// [Symbol] syntax will not be supported by TypeScript until v2.7static ɵdir = ɵɵdefineDirective({...});}
function ɵɵdefineInjectable
ɵɵdefineInjectable: <T>(opts: { token: unknown; providedIn?: Type<any> | 'root' | 'platform' | 'any' | 'environment' | null; factory: () => T;}) => unknown;
Construct an injectable definition which defines how a token will be constructed by the DI system, and in which injectors (if any) it will be available.
This should be assigned to a static
ɵprov
field on a type, which will then be anInjectableType
.Options: *
providedIn
determines which injectors will include the injectable, by either associating it with an@NgModule
or otherInjectorType
, or by specifying that this injectable should be provided in the'root'
injector, which will be the application-level injector in most apps. *factory
gives the zero argument function which will create an instance of the injectable. The factory can callinject
to access theInjector
and request injection of dependencies.This instruction has been emitted by ViewEngine for some time and is deployed to npm.
function ɵɵdefineInjector
ɵɵdefineInjector: (options: { providers?: any[]; imports?: any[] }) => unknown;
Construct an
InjectorDef
which configures an injector.This should be assigned to a static injector def (
ɵinj
) field on a type, which will then be anInjectorType
.Options:
*
providers
: an optional array of providers to add to the injector. Each provider must either have a factory or point to a type which has aɵprov
static property (the type must be anInjectableType
). *imports
: an optional array of imports of otherInjectorType
s orInjectorTypeWithModule
s whose providers will also be added to the injector. Locally provided types will override providers from imports.
function ɵɵdefineNgModule
ɵɵdefineNgModule: <T>(def: { type: T; bootstrap?: Type<any>[] | (() => Type<any>[]); declarations?: Type<any>[] | (() => Type<any>[]); imports?: Type<any>[] | (() => Type<any>[]); exports?: Type<any>[] | (() => Type<any>[]); schemas?: SchemaMetadata[] | null; id?: string | null;}) => unknown;
function ɵɵdefinePipe
ɵɵdefinePipe: <T>(pipeDef: { name: string; type: Type<T>; pure?: boolean; standalone?: boolean;}) => unknown;
Create a pipe definition object.
# Example
class MyPipe implements PipeTransform {// Generated by Angular Template Compilerstatic ɵpipe = definePipe({...});}Parameter pipeDef
Pipe definition generated by the compiler
function ɵɵdirectiveInject
ɵɵdirectiveInject: { <T>(token: ProviderToken<T>): T; <T>(token: ProviderToken<T>, flags: InjectFlags): T;};
Returns the value associated to the given token from the injectors.
directiveInject
is intended to be used for directive, component and pipe factories. All other injection useinject
which does not walk the node injector tree.Usage example (in factory function):
class SomeDirective {constructor(directive: DirectiveA) {}static ɵdir = ɵɵdefineDirective({type: SomeDirective,factory: () => new SomeDirective(ɵɵdirectiveInject(DirectiveA))});}Parameter token
the type or token to inject
Parameter flags
Injection flags
Returns
the value from the injector or
null
when not found
function ɵɵdisableBindings
ɵɵdisableBindings: () => void;
Disables directive matching on element.
* Example:
<my-comp my-directive>Should match component / directive.</my-comp><div ngNonBindable><!-- ɵɵdisableBindings() --><my-comp my-directive>Should not match component / directive because we are in ngNonBindable.</my-comp><!-- ɵɵenableBindings() --></div>
function ɵɵelement
ɵɵelement: ( index: number, name: string, attrsIndex?: number | null, localRefsIndex?: number) => typeof ɵɵelement;
Creates an empty element using elementStart and elementEnd
Parameter index
Index of the element in the data array
Parameter name
Name of the DOM Node
Parameter attrsIndex
Index of the element's attributes in the
consts
array.Parameter localRefsIndex
Index of the element's local references in the
consts
array.Returns
This function returns itself so that it may be chained.
function ɵɵelementContainer
ɵɵelementContainer: ( index: number, attrsIndex?: number | null, localRefsIndex?: number) => typeof ɵɵelementContainer;
Creates an empty logical container using elementContainerStart and elementContainerEnd
Parameter index
Index of the element in the LView array
Parameter attrsIndex
Index of the container attributes in the
consts
array.Parameter localRefsIndex
Index of the container's local references in the
consts
array.Returns
This function returns itself so that it may be chained.
function ɵɵelementContainerEnd
ɵɵelementContainerEnd: () => typeof ɵɵelementContainerEnd;
Mark the end of the .
Returns
This function returns itself so that it may be chained.
function ɵɵelementContainerStart
ɵɵelementContainerStart: ( index: number, attrsIndex?: number | null, localRefsIndex?: number) => typeof ɵɵelementContainerStart;
Creates a logical container for other nodes () backed by a comment node in the DOM. The instruction must later be followed by
elementContainerEnd()
call.Parameter index
Index of the element in the LView array
Parameter attrsIndex
Index of the container attributes in the
consts
array.Parameter localRefsIndex
Index of the container's local references in the
consts
array.Returns
This function returns itself so that it may be chained.
Even if this instruction accepts a set of attributes no actual attribute values are propagated to the DOM (as a comment node can't have attributes). Attributes are here only for directive matching purposes and setting initial inputs of directives.
function ɵɵelementEnd
ɵɵelementEnd: () => typeof ɵɵelementEnd;
Mark the end of the element.
Returns
This function returns itself so that it may be chained.
function ɵɵelementStart
ɵɵelementStart: ( index: number, name: string, attrsIndex?: number | null, localRefsIndex?: number) => typeof ɵɵelementStart;
Create DOM element. The instruction must later be followed by
elementEnd()
call.Parameter index
Index of the element in the LView array
Parameter name
Name of the DOM Node
Parameter attrsIndex
Index of the element's attributes in the
consts
array.Parameter localRefsIndex
Index of the element's local references in the
consts
array.Returns
This function returns itself so that it may be chained.
Attributes and localRefs are passed as an array of strings where elements with an even index hold an attribute name and elements with an odd index hold an attribute value, ex.: ['id', 'warning5', 'class', 'alert']
function ɵɵenableBindings
ɵɵenableBindings: () => void;
Enables directive matching on elements.
* Example:
<my-comp my-directive>Should match component / directive.</my-comp><div ngNonBindable><!-- ɵɵdisableBindings() --><my-comp my-directive>Should not match component / directive because we are in ngNonBindable.</my-comp><!-- ɵɵenableBindings() --></div>
function ɵɵgetCurrentView
ɵɵgetCurrentView: () => OpaqueViewState;
Returns the current OpaqueViewState instance.
Used in conjunction with the restoreView() instruction to save a snapshot of the current view and restore it when listeners are invoked. This allows walking the declaration view tree in listeners to get vars from parent views.
function ɵɵgetInheritedFactory
ɵɵgetInheritedFactory: <T>(type: Type<any>) => (type: Type<T>) => T;
function ɵɵHostDirectivesFeature
ɵɵHostDirectivesFeature: ( rawHostDirectives: HostDirectiveConfig[] | (() => HostDirectiveConfig[])) => (definition: ɵDirectiveDef<unknown>) => void;
This feature adds the host directives behavior to a directive definition by patching a function onto it. The expectation is that the runtime will invoke the function during directive matching.
For example:
class ComponentWithHostDirective {static ɵcmp = defineComponent({type: ComponentWithHostDirective,features: [ɵɵHostDirectivesFeature([SimpleHostDirective,{directive: AdvancedHostDirective, inputs: ['foo: alias'], outputs: ['bar']},])]});}
function ɵɵhostProperty
ɵɵhostProperty: <T>( propName: string, value: T, sanitizer?: SanitizerFn | null) => typeof ɵɵhostProperty;
Update a property on a host element. Only applies to native node properties, not inputs.
Operates on the element selected by index via the select instruction.
Parameter propName
Name of property. Because it is going to DOM, this is not subject to renaming as part of minification.
Parameter value
New value to write.
Parameter sanitizer
An optional function used to sanitize the value.
Returns
This function returns itself so that it may be chained (e.g.
property('name', ctx.name)('title', ctx.title)
)
function ɵɵi18n
ɵɵi18n: (index: number, messageIndex: number, subTemplateIndex?: number) => void;
Use this instruction to create a translation block that doesn't contain any placeholder. It calls both i18nStart and i18nEnd in one instruction.
The translation
message
is the value which is locale specific. The translation string may contain placeholders which associate inner elements and sub-templates within the translation.The translation
message
placeholders are: -�{index}(:{block})�
: *Binding Placeholder*: Marks a location where an expression will be interpolated into. The placeholderindex
points to the expression binding index. An optionalblock
that matches the sub-template in which it was declared. -�#{index}(:{block})�
/�/#{index}(:{block})�
: *Element Placeholder*: Marks the beginning and end of DOM element that were embedded in the original translation block. The placeholderindex
points to the element index in the template instructions set. An optionalblock
that matches the sub-template in which it was declared. -�*{index}:{block}�
/�/*{index}:{block}�
: *Sub-template Placeholder*: Sub-templates must be split up and translated separately in each angular template function. Theindex
points to thetemplate
instruction index. Ablock
that matches the sub-template in which it was declared.Parameter index
A unique index of the translation in the static block.
Parameter messageIndex
An index of the translation message from the
def.consts
array.Parameter subTemplateIndex
Optional sub-template index in the
message
.
function ɵɵi18nApply
ɵɵi18nApply: (index: number) => void;
Updates a translation block or an i18n attribute when the bindings have changed.
Parameter index
Index of either i18nStart (translation block) or i18nAttributes (i18n attribute) on which it should update the content.
function ɵɵi18nAttributes
ɵɵi18nAttributes: (index: number, attrsIndex: number) => void;
Marks a list of attributes as translatable.
Parameter index
A unique index in the static block
Parameter values
function ɵɵi18nEnd
ɵɵi18nEnd: () => void;
Translates a translation block marked by
i18nStart
andi18nEnd
. It inserts the text/ICU nodes into the render tree, moves the placeholder nodes and removes the deleted nodes.
function ɵɵi18nExp
ɵɵi18nExp: <T>(value: T) => typeof ɵɵi18nExp;
Stores the values of the bindings during each update cycle in order to determine if we need to update the translated nodes.
Parameter value
The binding's value
Returns
This function returns itself so that it may be chained (e.g.
i18nExp(ctx.name)(ctx.title)
)
function ɵɵi18nPostprocess
ɵɵi18nPostprocess: ( message: string, replacements?: { [key: string]: string | string[] }) => string;
Handles message string post-processing for internationalization.
Handles message string post-processing by transforming it from intermediate format (that might contain some markers that we need to replace) to the final form, consumable by i18nStart instruction. Post processing steps include:
1. Resolve all multi-value cases (like [�*1:1��#2:1�|�#4:1�|�5�]) 2. Replace all ICU vars (like "VAR_PLURAL") 3. Replace all placeholders used inside ICUs in a form of {PLACEHOLDER} 4. Replace all ICU references with corresponding values (like �ICU_EXP_ICU_1�) in case multiple ICUs have the same placeholder name
Parameter message
Raw translation string for post processing
Parameter replacements
Set of replacements that should be applied
Returns
Transformed string that can be consumed by i18nStart instruction
function ɵɵi18nStart
ɵɵi18nStart: ( index: number, messageIndex: number, subTemplateIndex?: number) => void;
Marks a block of text as translatable.
The instructions
i18nStart
andi18nEnd
mark the translation block in the template. The translationmessage
is the value which is locale specific. The translation string may contain placeholders which associate inner elements and sub-templates within the translation.The translation
message
placeholders are: -�{index}(:{block})�
: *Binding Placeholder*: Marks a location where an expression will be interpolated into. The placeholderindex
points to the expression binding index. An optionalblock
that matches the sub-template in which it was declared. -�#{index}(:{block})�
/�/#{index}(:{block})�
: *Element Placeholder*: Marks the beginning and end of DOM element that were embedded in the original translation block. The placeholderindex
points to the element index in the template instructions set. An optionalblock
that matches the sub-template in which it was declared. -�*{index}:{block}�
/�/*{index}:{block}�
: *Sub-template Placeholder*: Sub-templates must be split up and translated separately in each angular template function. Theindex
points to thetemplate
instruction index. Ablock
that matches the sub-template in which it was declared.Parameter index
A unique index of the translation in the static block.
Parameter messageIndex
An index of the translation message from the
def.consts
array.Parameter subTemplateIndex
Optional sub-template index in the
message
.
function ɵɵInheritDefinitionFeature
ɵɵInheritDefinitionFeature: ( definition: ɵDirectiveDef<any> | ɵComponentDef<any>) => void;
Merges the definition from a super class to a sub class.
Parameter definition
The definition that is a SubClass of another directive of component
function ɵɵinject
ɵɵinject: { <T>(token: ProviderToken<T>): T; <T>(token: ProviderToken<T>, flags?: InjectFlags): T;};
Generated instruction: injects a token from the currently active injector.
(Additional documentation moved to
inject
, as it is the public API, and an alias for this instruction)See Also
inject This instruction has been emitted by ViewEngine for some time and is deployed to npm.
function ɵɵinjectAttribute
ɵɵinjectAttribute: (attrNameToInject: string) => string | null;
Facade for the attribute injection from DI.
function ɵɵinvalidFactory
ɵɵinvalidFactory: () => never;
Throws an error indicating that a factory function could not be generated by the compiler for a particular class.
This instruction allows the actual error message to be optimized away when ngDevMode is turned off, saving bytes of generated code while still providing a good experience in dev mode.
The name of the class is not mentioned here, but will be in the generated factory function name and thus in the stack trace.
function ɵɵinvalidFactoryDep
ɵɵinvalidFactoryDep: (index: number) => never;
Throws an error indicating that a factory function could not be generated by the compiler for a particular class.
The name of the class is not mentioned here, but will be in the generated factory function name and thus in the stack trace.
function ɵɵlistener
ɵɵlistener: ( eventName: string, listenerFn: (e?: any) => any, useCapture?: boolean, eventTargetResolver?: GlobalTargetResolver) => typeof ɵɵlistener;
Adds an event listener to the current node.
If an output exists on one of the node's directives, it also subscribes to the output and saves the subscription for later cleanup.
Parameter eventName
Name of the event
Parameter listenerFn
The function to be called when event emits
Parameter useCapture
Whether or not to use capture in event listener - this argument is a reminder from the Renderer3 infrastructure and should be removed from the instruction arguments
Parameter eventTargetResolver
Function that returns global target information in case this listener should be attached to a global object like window, document or body
function ɵɵloadQuery
ɵɵloadQuery: <T>() => QueryList<T>;
Loads a QueryList corresponding to the current view or content query.
function ɵɵnamespaceHTML
ɵɵnamespaceHTML: () => void;
Sets the namespace used to create elements to
null
, which forces element creation to usecreateElement
rather thancreateElementNS
.
function ɵɵnamespaceMathML
ɵɵnamespaceMathML: () => void;
Sets the namespace used to create elements to
'http://www.w3.org/1998/MathML/'
in global state.
function ɵɵnamespaceSVG
ɵɵnamespaceSVG: () => void;
Sets the namespace used to create elements to
'http://www.w3.org/2000/svg'
in global state.
function ɵɵnextContext
ɵɵnextContext: <T = any>(level?: number) => T;
Retrieves a context at the level specified and saves it as the global, contextViewData. Will get the next level up if level is not specified.
This is used to save contexts of parent views so they can be bound in embedded views, or in conjunction with reference() to bind a ref from a parent view.
Parameter level
The relative level of the view from which to grab context compared to contextVewData
Returns
context
function ɵɵngDeclareClassMetadata
ɵɵngDeclareClassMetadata: (decl: { type: Type<any>; decorators: any[]; ctorParameters?: () => any[]; propDecorators?: { [field: string]: any };}) => void;
Evaluates the class metadata declaration.
function ɵɵngDeclareComponent
ɵɵngDeclareComponent: (decl: R3DeclareComponentFacade) => unknown;
Compiles a partial component declaration object into a full component definition object.
function ɵɵngDeclareDirective
ɵɵngDeclareDirective: (decl: R3DeclareDirectiveFacade) => unknown;
Compiles a partial directive declaration object into a full directive definition object.
function ɵɵngDeclareFactory
ɵɵngDeclareFactory: (decl: R3DeclareFactoryFacade) => unknown;
Compiles a partial pipe declaration object into a full pipe definition object.
function ɵɵngDeclareInjectable
ɵɵngDeclareInjectable: (decl: R3DeclareInjectableFacade) => unknown;
Compiles a partial injectable declaration object into a full injectable definition object.
function ɵɵngDeclareInjector
ɵɵngDeclareInjector: (decl: R3DeclareInjectorFacade) => unknown;
Compiles a partial injector declaration object into a full injector definition object.
function ɵɵngDeclareNgModule
ɵɵngDeclareNgModule: (decl: R3DeclareNgModuleFacade) => unknown;
Compiles a partial NgModule declaration object into a full NgModule definition object.
function ɵɵngDeclarePipe
ɵɵngDeclarePipe: (decl: R3DeclarePipeFacade) => unknown;
Compiles a partial pipe declaration object into a full pipe definition object.
function ɵɵNgOnChangesFeature
ɵɵNgOnChangesFeature: <T>() => DirectiveDefFeature;
The NgOnChangesFeature decorates a component with support for the ngOnChanges lifecycle hook, so it should be included in any component that implements that hook.
If the component or directive uses inheritance, the NgOnChangesFeature MUST be included as a feature AFTER InheritDefinitionFeature, otherwise inherited properties will not be propagated to the ngOnChanges lifecycle hook.
Example usage:
static ɵcmp = defineComponent({...inputs: {name: 'publicName'},features: [NgOnChangesFeature]});
function ɵɵpipe
ɵɵpipe: (index: number, pipeName: string) => any;
Create a pipe.
Parameter index
Pipe index where the pipe will be stored.
Parameter pipeName
The name of the pipe
Returns
T the instance of the pipe.
function ɵɵpipeBind1
ɵɵpipeBind1: (index: number, slotOffset: number, v1: any) => any;
Invokes a pipe with 1 arguments.
This instruction acts as a guard to PipeTransform#transform invoking the pipe only when an input to the pipe changes.
Parameter index
Pipe index where the pipe was stored on creation.
Parameter slotOffset
the offset in the reserved slot space
Parameter v1
1st argument to PipeTransform#transform.
function ɵɵpipeBind2
ɵɵpipeBind2: (index: number, slotOffset: number, v1: any, v2: any) => any;
Invokes a pipe with 2 arguments.
This instruction acts as a guard to PipeTransform#transform invoking the pipe only when an input to the pipe changes.
Parameter index
Pipe index where the pipe was stored on creation.
Parameter slotOffset
the offset in the reserved slot space
Parameter v1
1st argument to PipeTransform#transform.
Parameter v2
2nd argument to PipeTransform#transform.
function ɵɵpipeBind3
ɵɵpipeBind3: ( index: number, slotOffset: number, v1: any, v2: any, v3: any) => any;
Invokes a pipe with 3 arguments.
This instruction acts as a guard to PipeTransform#transform invoking the pipe only when an input to the pipe changes.
Parameter index
Pipe index where the pipe was stored on creation.
Parameter slotOffset
the offset in the reserved slot space
Parameter v1
1st argument to PipeTransform#transform.
Parameter v2
2nd argument to PipeTransform#transform.
Parameter v3
4rd argument to PipeTransform#transform.
function ɵɵpipeBind4
ɵɵpipeBind4: ( index: number, slotOffset: number, v1: any, v2: any, v3: any, v4: any) => any;
Invokes a pipe with 4 arguments.
This instruction acts as a guard to PipeTransform#transform invoking the pipe only when an input to the pipe changes.
Parameter index
Pipe index where the pipe was stored on creation.
Parameter slotOffset
the offset in the reserved slot space
Parameter v1
1st argument to PipeTransform#transform.
Parameter v2
2nd argument to PipeTransform#transform.
Parameter v3
3rd argument to PipeTransform#transform.
Parameter v4
4th argument to PipeTransform#transform.
function ɵɵpipeBindV
ɵɵpipeBindV: (index: number, slotOffset: number, values: [any, ...any[]]) => any;
Invokes a pipe with variable number of arguments.
This instruction acts as a guard to PipeTransform#transform invoking the pipe only when an input to the pipe changes.
Parameter index
Pipe index where the pipe was stored on creation.
Parameter slotOffset
the offset in the reserved slot space
Parameter values
Array of arguments to pass to PipeTransform#transform method.
function ɵɵprojection
ɵɵprojection: ( nodeIndex: number, selectorIndex?: number, attrs?: TAttributes) => void;
Inserts previously re-distributed projected nodes. This instruction must be preceded by a call to the projectionDef instruction.
Parameter nodeIndex
Parameter selectorIndex
: - 0 when the selector is
*
(or unspecified as this is the default value), - 1 based index of the selector from the projectionDef
function ɵɵprojectionDef
ɵɵprojectionDef: (projectionSlots?: ProjectionSlots) => void;
Instruction to distribute projectable nodes among occurrences in a given template. It takes all the selectors from the entire component's template and decides where each projected node belongs (it re-distributes nodes among "buckets" where each "bucket" is backed by a selector).
This function requires CSS selectors to be provided in 2 forms: parsed (by a compiler) and text, un-parsed form.
The parsed form is needed for efficient matching of a node against a given CSS selector. The un-parsed, textual form is needed for support of the ngProjectAs attribute.
Having a CSS selector in 2 different formats is not ideal, but alternatives have even more drawbacks: - having only a textual form would require runtime parsing of CSS selectors; - we can't have only a parsed as we can't re-construct textual form from it (as entered by a template author).
Parameter projectionSlots
? A collection of projection slots. A projection slot can be based on a parsed CSS selectors or set to the wildcard selector ("*") in order to match all nodes which do not match any selector. If not specified, a single wildcard selector projection slot will be defined.
function ɵɵproperty
ɵɵproperty: <T>( propName: string, value: T, sanitizer?: SanitizerFn | null) => typeof ɵɵproperty;
Update a property on a selected element.
Operates on the element selected by index via the select instruction.
If the property name also exists as an input property on one of the element's directives, the component property will be set instead of the element property. This check must be conducted at runtime so child components that add new
@Inputs
don't have to be re-compiledParameter propName
Name of property. Because it is going to DOM, this is not subject to renaming as part of minification.
Parameter value
New value to write.
Parameter sanitizer
An optional function used to sanitize the value.
Returns
This function returns itself so that it may be chained (e.g.
property('name', ctx.name)('title', ctx.title)
)
function ɵɵpropertyInterpolate
ɵɵpropertyInterpolate: ( propName: string, v0: any, sanitizer?: SanitizerFn) => typeof ɵɵpropertyInterpolate;
Update an interpolated property on an element with a lone bound value
Used when the value passed to a property has 1 interpolated value in it, an no additional text surrounds that interpolated value:
<div title="{{v0}}"></div>Its compiled representation is::
ɵɵpropertyInterpolate('title', v0);If the property name also exists as an input property on one of the element's directives, the component property will be set instead of the element property. This check must be conducted at runtime so child components that add new
@Inputs
don't have to be re-compiled.Parameter propName
The name of the property to update
Parameter prefix
Static value used for concatenation only.
Parameter v0
Value checked for change.
Parameter suffix
Static value used for concatenation only.
Parameter sanitizer
An optional sanitizer function
Returns
itself, so that it may be chained.
function ɵɵpropertyInterpolate1
ɵɵpropertyInterpolate1: ( propName: string, prefix: string, v0: any, suffix: string, sanitizer?: SanitizerFn) => typeof ɵɵpropertyInterpolate1;
Update an interpolated property on an element with single bound value surrounded by text.
Used when the value passed to a property has 1 interpolated value in it:
<div title="prefix{{v0}}suffix"></div>Its compiled representation is::
ɵɵpropertyInterpolate1('title', 'prefix', v0, 'suffix');If the property name also exists as an input property on one of the element's directives, the component property will be set instead of the element property. This check must be conducted at runtime so child components that add new
@Inputs
don't have to be re-compiled.Parameter propName
The name of the property to update
Parameter prefix
Static value used for concatenation only.
Parameter v0
Value checked for change.
Parameter suffix
Static value used for concatenation only.
Parameter sanitizer
An optional sanitizer function
Returns
itself, so that it may be chained.
function ɵɵpropertyInterpolate2
ɵɵpropertyInterpolate2: ( propName: string, prefix: string, v0: any, i0: string, v1: any, suffix: string, sanitizer?: SanitizerFn) => typeof ɵɵpropertyInterpolate2;
Update an interpolated property on an element with 2 bound values surrounded by text.
Used when the value passed to a property has 2 interpolated values in it:
<div title="prefix{{v0}}-{{v1}}suffix"></div>Its compiled representation is::
ɵɵpropertyInterpolate2('title', 'prefix', v0, '-', v1, 'suffix');If the property name also exists as an input property on one of the element's directives, the component property will be set instead of the element property. This check must be conducted at runtime so child components that add new
@Inputs
don't have to be re-compiled.Parameter propName
The name of the property to update
Parameter prefix
Static value used for concatenation only.
Parameter v0
Value checked for change.
Parameter i0
Static value used for concatenation only.
Parameter v1
Value checked for change.
Parameter suffix
Static value used for concatenation only.
Parameter sanitizer
An optional sanitizer function
Returns
itself, so that it may be chained.
function ɵɵpropertyInterpolate3
ɵɵpropertyInterpolate3: ( propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, suffix: string, sanitizer?: SanitizerFn) => typeof ɵɵpropertyInterpolate3;
Update an interpolated property on an element with 3 bound values surrounded by text.
Used when the value passed to a property has 3 interpolated values in it:
<div title="prefix{{v0}}-{{v1}}-{{v2}}suffix"></div>Its compiled representation is::
ɵɵpropertyInterpolate3('title', 'prefix', v0, '-', v1, '-', v2, 'suffix');If the property name also exists as an input property on one of the element's directives, the component property will be set instead of the element property. This check must be conducted at runtime so child components that add new
@Inputs
don't have to be re-compiled.Parameter propName
The name of the property to update
Parameter prefix
Static value used for concatenation only.
Parameter v0
Value checked for change.
Parameter i0
Static value used for concatenation only.
Parameter v1
Value checked for change.
Parameter i1
Static value used for concatenation only.
Parameter v2
Value checked for change.
Parameter suffix
Static value used for concatenation only.
Parameter sanitizer
An optional sanitizer function
Returns
itself, so that it may be chained.
function ɵɵpropertyInterpolate4
ɵɵpropertyInterpolate4: ( propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, suffix: string, sanitizer?: SanitizerFn) => typeof ɵɵpropertyInterpolate4;
Update an interpolated property on an element with 4 bound values surrounded by text.
Used when the value passed to a property has 4 interpolated values in it:
<div title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix"></div>Its compiled representation is::
ɵɵpropertyInterpolate4('title', 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');If the property name also exists as an input property on one of the element's directives, the component property will be set instead of the element property. This check must be conducted at runtime so child components that add new
@Inputs
don't have to be re-compiled.Parameter propName
The name of the property to update
Parameter prefix
Static value used for concatenation only.
Parameter v0
Value checked for change.
Parameter i0
Static value used for concatenation only.
Parameter v1
Value checked for change.
Parameter i1
Static value used for concatenation only.
Parameter v2
Value checked for change.
Parameter i2
Static value used for concatenation only.
Parameter v3
Value checked for change.
Parameter suffix
Static value used for concatenation only.
Parameter sanitizer
An optional sanitizer function
Returns
itself, so that it may be chained.
function ɵɵpropertyInterpolate5
ɵɵpropertyInterpolate5: ( propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, suffix: string, sanitizer?: SanitizerFn) => typeof ɵɵpropertyInterpolate5;
Update an interpolated property on an element with 5 bound values surrounded by text.
Used when the value passed to a property has 5 interpolated values in it:
<div title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix"></div>Its compiled representation is::
ɵɵpropertyInterpolate5('title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');If the property name also exists as an input property on one of the element's directives, the component property will be set instead of the element property. This check must be conducted at runtime so child components that add new
@Inputs
don't have to be re-compiled.Parameter propName
The name of the property to update
Parameter prefix
Static value used for concatenation only.
Parameter v0
Value checked for change.
Parameter i0
Static value used for concatenation only.
Parameter v1
Value checked for change.
Parameter i1
Static value used for concatenation only.
Parameter v2
Value checked for change.
Parameter i2
Static value used for concatenation only.
Parameter v3
Value checked for change.
Parameter i3
Static value used for concatenation only.
Parameter v4
Value checked for change.
Parameter suffix
Static value used for concatenation only.
Parameter sanitizer
An optional sanitizer function
Returns
itself, so that it may be chained.
function ɵɵpropertyInterpolate6
ɵɵpropertyInterpolate6: ( propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, i4: string, v5: any, suffix: string, sanitizer?: SanitizerFn) => typeof ɵɵpropertyInterpolate6;
Update an interpolated property on an element with 6 bound values surrounded by text.
Used when the value passed to a property has 6 interpolated values in it:
<div title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix"></div>Its compiled representation is::
ɵɵpropertyInterpolate6('title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');If the property name also exists as an input property on one of the element's directives, the component property will be set instead of the element property. This check must be conducted at runtime so child components that add new
@Inputs
don't have to be re-compiled.Parameter propName
The name of the property to update
Parameter prefix
Static value used for concatenation only.
Parameter v0
Value checked for change.
Parameter i0
Static value used for concatenation only.
Parameter v1
Value checked for change.
Parameter i1
Static value used for concatenation only.
Parameter v2
Value checked for change.
Parameter i2
Static value used for concatenation only.
Parameter v3
Value checked for change.
Parameter i3
Static value used for concatenation only.
Parameter v4
Value checked for change.
Parameter i4
Static value used for concatenation only.
Parameter v5
Value checked for change.
Parameter suffix
Static value used for concatenation only.
Parameter sanitizer
An optional sanitizer function
Returns
itself, so that it may be chained.
function ɵɵpropertyInterpolate7
ɵɵpropertyInterpolate7: ( propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, suffix: string, sanitizer?: SanitizerFn) => typeof ɵɵpropertyInterpolate7;
Update an interpolated property on an element with 7 bound values surrounded by text.
Used when the value passed to a property has 7 interpolated values in it:
<div title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix"></div>Its compiled representation is::
ɵɵpropertyInterpolate7('title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');If the property name also exists as an input property on one of the element's directives, the component property will be set instead of the element property. This check must be conducted at runtime so child components that add new
@Inputs
don't have to be re-compiled.Parameter propName
The name of the property to update
Parameter prefix
Static value used for concatenation only.
Parameter v0
Value checked for change.
Parameter i0
Static value used for concatenation only.
Parameter v1
Value checked for change.
Parameter i1
Static value used for concatenation only.
Parameter v2
Value checked for change.
Parameter i2
Static value used for concatenation only.
Parameter v3
Value checked for change.
Parameter i3
Static value used for concatenation only.
Parameter v4
Value checked for change.
Parameter i4
Static value used for concatenation only.
Parameter v5
Value checked for change.
Parameter i5
Static value used for concatenation only.
Parameter v6
Value checked for change.
Parameter suffix
Static value used for concatenation only.
Parameter sanitizer
An optional sanitizer function
Returns
itself, so that it may be chained.
function ɵɵpropertyInterpolate8
ɵɵpropertyInterpolate8: ( propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, i6: string, v7: any, suffix: string, sanitizer?: SanitizerFn) => typeof ɵɵpropertyInterpolate8;
Update an interpolated property on an element with 8 bound values surrounded by text.
Used when the value passed to a property has 8 interpolated values in it:
<div title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix"></div>Its compiled representation is::
ɵɵpropertyInterpolate8('title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');If the property name also exists as an input property on one of the element's directives, the component property will be set instead of the element property. This check must be conducted at runtime so child components that add new
@Inputs
don't have to be re-compiled.Parameter propName
The name of the property to update
Parameter prefix
Static value used for concatenation only.
Parameter v0
Value checked for change.
Parameter i0
Static value used for concatenation only.
Parameter v1
Value checked for change.
Parameter i1
Static value used for concatenation only.
Parameter v2
Value checked for change.
Parameter i2
Static value used for concatenation only.
Parameter v3
Value checked for change.
Parameter i3
Static value used for concatenation only.
Parameter v4
Value checked for change.
Parameter i4
Static value used for concatenation only.
Parameter v5
Value checked for change.
Parameter i5
Static value used for concatenation only.
Parameter v6
Value checked for change.
Parameter i6
Static value used for concatenation only.
Parameter v7
Value checked for change.
Parameter suffix
Static value used for concatenation only.
Parameter sanitizer
An optional sanitizer function
Returns
itself, so that it may be chained.