@angular/core
- Version 18.2.10
- Published
- 21.1 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
- ContentChild
- ContentChildren
- CONTEXT
- createNgModuleRef
- CSP_NONCE
- CUSTOM_ELEMENTS_SCHEMA
- DECLARATION_COMPONENT_VIEW
- DECLARATION_LCONTAINER
- DECLARATION_VIEW
- DEFAULT_CURRENCY_CODE
- defineInjectable
- DEHYDRATED_VIEWS
- Directive
- DISCONNECTED_NODES
- EFFECTS_TO_SCHEDULE
- ELEMENT_CONTAINERS
- ELEMENT_MARKER
- EMBEDDED_VIEW_INJECTOR
- ENVIRONMENT
- ENVIRONMENT_INITIALIZER
- EventEmitter
- FLAGS
- GLOBAL_PUBLISH_EXPANDO_KEY
- globalUtilsFunctions
- Host
- HOST
- HOST_TAG_NAME
- HostBinding
- HostListener
- HYDRATION
- HYDRATION_INFO_KEY
- I18N_DATA
- ICU_MARKER
- ID
- Inject
- Injectable
- INJECTOR
- INJECTOR_2
- input
- Input
- ITS_JUST_ANGULAR
- LOCALE_ID
- model
- MOVED_VIEWS
- MULTIPLIER
- NATIVE
- NEXT
- NgModule
- NO_ERRORS_SCHEMA
- NODES
- NUM_ROOT_NODES
- ON_DESTROY_HOOKS
- Optional
- Output
- ɵALLOW_MULTIPLE_PLATFORMS
- ɵCONTAINER_HEADER_OFFSET
- ɵDEFAULT_LOCALE_ID
- ɵdefaultIterableDiffers
- ɵdefaultKeyValueDiffers
- ɵDEFER_BLOCK_CONFIG
- ɵDEFER_BLOCK_DEPENDENCY_INTERCEPTOR
- ɵdepsTracker
- ɵglobal
- ɵIMAGE_CONFIG
- ɵIMAGE_CONFIG_DEFAULTS
- ɵINJECTOR_SCOPE
- ɵINPUT_SIGNAL_BRAND_READ_TYPE
- ɵINPUT_SIGNAL_BRAND_WRITE_TYPE
- ɵINTERNAL_APPLICATION_ERROR_HANDLER
- ɵIS_HYDRATION_DOM_REUSE_ENABLED
- ɵJSACTION_EVENT_CONTRACT
- ɵ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
- ɵPROVIDED_NG_ZONE
- ɵSSR_CONTENT_INTEGRITY_MARKER
- ɵTESTABILITY
- ɵTESTABILITY_GETTER
- ɵUSE_RUNTIME_DEPS_TRACKER_FOR_JIT
- ɵWRITABLE_SIGNAL
- ɵXSS_SECURITY_URL
- ɵZONELESS_ENABLED
- PACKAGE_ROOT_URL
- PARENT
- Pipe
- PLATFORM_ID
- PLATFORM_INITIALIZER
- PREORDER_HOOK_FLAGS
- QUERIES
- REACTIVE_TEMPLATE_CONSUMER
- RENDERER
- Self
- SkipSelf
- T_HOST
- TEMPLATE_ID
- TEMPLATES
- TRANSLATIONS
- TRANSLATIONS_FORMAT
- TVIEW
- Type
- TYPE
- VERSION
- VIEW_REFS
- viewChild
- ViewChild
- ViewChildren
Functions
- afterNextRender()
- afterRender()
- applyChanges()
- asNativeElements()
- assertInInjectionContext()
- assertNotInReactiveContext()
- assertPlatform()
- booleanAttribute()
- computed()
- contentChildren()
- createComponent()
- createEnvironmentInjector()
- createNgModule()
- createPlatform()
- createPlatformFactory()
- destroyPlatform()
- effect()
- enableProdMode()
- forwardRef()
- getComponent()
- getContext()
- getDebugNode()
- getDependenciesFromInjectable()
- getDirectiveMetadata()
- getInjector()
- getInjectorMetadata()
- getInjectorProviders()
- getInjectorResolutionPath()
- getListeners()
- getModuleFactory()
- getNgModuleById()
- getOwningComponent()
- getPlatform()
- getRootComponents()
- importProvidersFrom()
- inject()
- isDevMode()
- isSignal()
- isStandalone()
- makeEnvironmentProviders()
- makeStateKey()
- mergeApplicationConfig()
- numberAttribute()
- output()
- ɵ_sanitizeHtml()
- ɵ_sanitizeUrl()
- ɵallowSanitizationBypassAndThrow()
- ɵannotateForHydration()
- ɵbypassSanitizationTrustHtml()
- ɵbypassSanitizationTrustResourceUrl()
- ɵbypassSanitizationTrustScript()
- ɵbypassSanitizationTrustStyle()
- ɵbypassSanitizationTrustUrl()
- ɵclearResolutionOfComponentResourcesQueue()
- ɵcompileComponent()
- ɵcompileDirective()
- ɵcompileNgModule()
- ɵcompileNgModuleDefs()
- ɵcompileNgModuleFactory()
- ɵcompilePipe()
- ɵconvertToBitFlags()
- ɵcreateInjector()
- ɵdetectChangesInViewIfRequired()
- ɵdevModeEqual()
- ɵfindLocaleData()
- ɵflushModuleScopingQueueAsMuchAsPossible()
- ɵformatRuntimeError()
- ɵgenerateStandaloneInDeclarationsError()
- ɵgetAsyncClassMetadataFn()
- ɵgetDebugNode()
- ɵgetDeferBlocks()
- ɵgetDirectives()
- ɵgetHostElement()
- ɵgetInjectableDef()
- ɵgetLContext()
- ɵgetLocaleCurrencyCode()
- ɵgetLocalePluralCase()
- ɵgetOutputDestroyRef()
- ɵgetSanitizationBypassType()
- ɵgetUnknownElementStrictMode()
- ɵgetUnknownPropertyStrictMode()
- ɵinjectChangeDetectorRef()
- ɵinternalCreateApplication()
- ɵinternalProvideZoneChangeDetection()
- ɵisBoundToModule()
- ɵisComponentDefPendingResolution()
- ɵ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()
- ɵɵcomponentInstance()
- ɵɵconditional()
- ɵɵcontentQuery()
- ɵɵcontentQuerySignal()
- ɵɵCopyDefinitionFeature()
- ɵɵdeclareLet()
- ɵɵdefer()
- ɵɵdeferEnableTimerScheduling()
- ɵɵdeferOnHover()
- ɵɵdeferOnIdle()
- ɵɵdeferOnImmediate()
- ɵɵdeferOnInteraction()
- ɵɵdeferOnTimer()
- ɵɵdeferOnViewport()
- ɵɵdeferPrefetchOnHover()
- ɵɵdeferPrefetchOnIdle()
- ɵɵdeferPrefetchOnImmediate()
- ɵɵdeferPrefetchOnInteraction()
- ɵɵdeferPrefetchOnTimer()
- ɵɵdeferPrefetchOnViewport()
- ɵɵdeferPrefetchWhen()
- ɵɵdeferWhen()
- ɵɵdefineComponent()
- ɵɵdefineDirective()
- ɵɵdefineInjectable()
- ɵɵdefineInjector()
- ɵɵdefineNgModule()
- ɵɵdefinePipe()
- ɵɵdirectiveInject()
- ɵɵdisableBindings()
- ɵɵelement()
- ɵɵelementContainer()
- ɵɵelementContainerEnd()
- ɵɵelementContainerStart()
- ɵɵelementEnd()
- ɵɵelementStart()
- ɵɵenableBindings()
- ɵɵgetComponentDepsFactory()
- ɵɵgetCurrentView()
- ɵɵgetInheritedFactory()
- ɵɵHostDirectivesFeature()
- ɵɵhostProperty()
- ɵɵi18n()
- ɵɵi18nApply()
- ɵɵi18nAttributes()
- ɵɵi18nEnd()
- ɵɵi18nExp()
- ɵɵi18nPostprocess()
- ɵɵi18nStart()
- ɵɵInheritDefinitionFeature()
- ɵɵinject()
- ɵɵinjectAttribute()
- ɵɵInputTransformsFeature()
- ɵɵinvalidFactory()
- ɵɵinvalidFactoryDep()
- ɵɵlistener()
- ɵɵloadQuery()
- ɵɵnamespaceHTML()
- ɵɵnamespaceMathML()
- ɵɵnamespaceSVG()
- ɵɵnextContext()
- ɵɵngDeclareClassMetadata()
- ɵɵngDeclareClassMetadataAsync()
- ɵɵ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()
- ɵɵqueryAdvance()
- ɵɵqueryRefresh()
- ɵɵreadContextLet()
- ɵɵreference()
- ɵɵregisterNgModuleType()
- ɵɵrepeater()
- ɵɵrepeaterCreate()
- ɵɵrepeaterTrackByIdentity()
- ɵɵrepeaterTrackByIndex()
- ɵɵresetView()
- ɵɵresolveBody()
- ɵɵresolveDocument()
- ɵɵresolveWindow()
- ɵɵrestoreView()
- ɵɵsanitizeHtml()
- ɵɵsanitizeResourceUrl()
- ɵɵsanitizeScript()
- ɵɵsanitizeStyle()
- ɵɵsanitizeUrl()
- ɵɵsanitizeUrlOrResourceUrl()
- ɵɵsetComponentScope()
- ɵɵsetNgModuleScope()
- ɵɵStandaloneFeature()
- ɵɵstoreLet()
- ɵɵ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()
- ɵɵtwoWayBindingSet()
- ɵɵtwoWayListener()
- ɵɵtwoWayProperty()
- ɵɵvalidateIframeAttribute()
- ɵɵviewQuery()
- ɵɵviewQuerySignal()
- ɵpatchComponentDefWithScope()
- ɵperformanceMarkFeature()
- ɵreadHydrationInfo()
- ɵregisterLocaleData()
- ɵrenderDeferBlockState()
- ɵresetCompiledComponents()
- ɵresetJitOptions()
- ɵresolveComponentResources()
- ɵrestoreComponentResolutionQueue()
- ɵsetAllowDuplicateNgModuleIdsForTest()
- ɵsetAlternateWeakRefImpl()
- ɵsetClassDebugInfo()
- ɵsetClassMetadata()
- ɵsetClassMetadataAsync()
- ɵsetCurrentInjector()
- ɵsetDocument()
- ɵsetInjectorProfilerContext()
- ɵsetLocaleId()
- ɵsetUnknownElementStrictMode()
- ɵsetUnknownPropertyStrictMode()
- ɵstore()
- ɵstringify()
- ɵtransitiveScopesFor()
- ɵtriggerResourceLoading()
- ɵtruncateMiddle()
- ɵunregisterLocaleData()
- ɵunwrapSafeValue()
- ɵunwrapWritableSignal()
- ɵwhenStable()
- ɵwithDomHydration()
- ɵwithEventReplay()
- ɵwithI18nSupport()
- platformCore()
- provideExperimentalCheckNoChangesForDebug()
- provideExperimentalZonelessChangeDetection()
- provideZoneChangeDetection()
- reflectComponentType()
- resolveForwardRef()
- runInInjectionContext()
- setTestabilityGetter()
- signal()
- untracked()
- viewChildren()
Classes
Interfaces
Enums
ɵRuntimeErrorCode
- APPLICATION_REF_ALREADY_DESTROYED
- ASSERTION_NOT_INSIDE_REACTIVE_CONTEXT
- ASYNC_INITIALIZERS_STILL_RUNNING
- BOOTSTRAP_COMPONENTS_NOT_FOUND
- COMPONENT_ID_COLLISION
- CYCLIC_DI_DEPENDENCY
- DEFER_LOADING_FAILED
- DUPLICATE_DIRECTIVE
- EXPORT_NOT_FOUND
- EXPRESSION_CHANGED_AFTER_CHECKED
- HOST_DIRECTIVE_COMPONENT
- HOST_DIRECTIVE_CONFLICTING_ALIAS
- HOST_DIRECTIVE_NOT_STANDALONE
- HOST_DIRECTIVE_UNDEFINED_BINDING
- HOST_DIRECTIVE_UNRESOLVABLE
- HYDRATION_MISSING_NODE
- HYDRATION_MISSING_SIBLINGS
- HYDRATION_NODE_MISMATCH
- HYDRATION_STABLE_TIMEDOUT
- IMAGE_PERFORMANCE_WARNING
- IMPORT_PROVIDERS_FROM_STANDALONE
- INFINITE_CHANGE_DETECTION
- INJECTOR_ALREADY_DESTROYED
- INVALID_DIFFER_INPUT
- INVALID_EVENT_BINDING
- INVALID_FACTORY_DEPENDENCY
- INVALID_I18N_STRUCTURE
- INVALID_INHERITANCE
- INVALID_INJECTION_TOKEN
- INVALID_MULTI_PROVIDER
- INVALID_SKIP_HYDRATION_HOST
- LOOP_TRACK_DUPLICATE_KEYS
- LOOP_TRACK_RECREATE
- MISSING_DOCUMENT
- MISSING_GENERATED_DEF
- MISSING_HYDRATION_ANNOTATIONS
- MISSING_INJECTION_CONTEXT
- MISSING_INJECTION_TOKEN
- MISSING_LOCALE_DATA
- MISSING_REQUIRED_INJECTABLE_IN_BOOTSTRAP
- MISSING_SSR_CONTENT_INTEGRITY_MARKER
- MISSING_ZONEJS
- MULTIPLE_COMPONENTS_MATCH
- MULTIPLE_MATCHING_PIPES
- MULTIPLE_PLATFORMS
- NO_SUPPORTING_DIFFER_FACTORY
- OUTPUT_REF_DESTROYED
- PIPE_NOT_FOUND
- PLATFORM_ALREADY_DESTROYED
- PLATFORM_NOT_FOUND
- PROVIDED_BOTH_ZONE_AND_ZONELESS
- PROVIDER_IN_WRONG_CONTEXT
- PROVIDER_NOT_FOUND
- RECURSIVE_APPLICATION_REF_TICK
- RENDERER_NOT_FOUND
- REQUIRE_SYNC_WITHOUT_SYNC_EMIT
- REQUIRED_INPUT_NO_VALUE
- REQUIRED_MODEL_NO_VALUE
- REQUIRED_QUERY_NO_VALUE
- RUNTIME_DEPS_INVALID_IMPORTED_TYPE
- RUNTIME_DEPS_ORPHAN_COMPONENT
- SIGNAL_WRITE_FROM_ILLEGAL_CONTEXT
- TEMPLATE_STRUCTURE_ERROR
- TYPE_IS_NOT_STANDALONE
- UNEXPECTED_ZONE_STATE
- UNEXPECTED_ZONEJS_PRESENT_IN_ZONELESS_MODE
- UNINITIALIZED_LET_ACCESS
- UNKNOWN_BINDING
- UNKNOWN_ELEMENT
- UNSAFE_IFRAME_ATTRS
- UNSAFE_VALUE_IN_RESOURCE_URL
- UNSAFE_VALUE_IN_SCRIPT
- UNSUPPORTED_PROJECTION_DOM_NODES
- VIEW_ALREADY_ATTACHED
- VIEW_ALREADY_DESTROYED
Type Aliases
- CompilerOptions
- ContentChild
- ContentChildren
- EffectCleanupFn
- EffectCleanupRegisterFn
- EnvironmentProviders
- ImportedNgModuleProviders
- ImportProvidersSource
- InjectableProvider
- InputOptionsWithoutTransform
- InputOptionsWithTransform
- NgIterable
- ɵCssSelectorList
- ɵFirstAvailable
- ɵGlobalDevModeUtils
- ɵHydratedNode
- ɵHydrationInfo
- ɵImageConfig
- ɵɵComponentDeclaration
- ɵɵDirectiveDeclaration
- ɵɵFactoryDeclaration
- ɵɵInjectorDeclaration
- ɵɵNgModuleDeclaration
- ɵɵPipeDeclaration
- ɵUnwrapDirectiveSignalInputs
- ɵWritable
- Predicate
- Provider
- ProviderToken
- Signal
- StateKey
- StaticProvider
- ValueEqualityFn
- ViewChild
- ViewChildren
Namespaces
Variables
variable ANIMATION_MODULE_TYPE
const ANIMATION_MODULE_TYPE: InjectionToken<'NoopAnimations' | 'BrowserAnimations'>;
A [DI token](api/core/InjectionToken) that indicates which animations module has been loaded.
variable APP_BOOTSTRAP_LISTENER
const APP_BOOTSTRAP_LISTENER: InjectionToken< readonly ((compRef: ComponentRef<any>) => void)[]>;
A DI token 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 representing a string ID, used primarily for prefixing application attributes and CSS styles when ViewEncapsulation#Emulated 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 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
The following example illustrates how to configure a multi-provider using
APP_INITIALIZER
token and a function returning a promise. ### Example with NgModule-based applicationfunction 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 {}### Example with standalone application
export function initializeApp(http: HttpClient) {return (): Promise<any> =>firstValueFrom(http.get("https://someUrl.com/api/user").pipe(tap(user => { ... })));}bootstrapApplication(App, {providers: [provideHttpClient(),{provide: APP_INITIALIZER,useFactory: initializeApp,multi: true,deps: [HttpClient],},],});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.### Example with NgModule-based application
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 {}### Example with standalone application
function initializeAppFactory(httpClient: HttpClient): () => Observable<any> {return () => httpClient.get("https://someUrl.com/api/user").pipe(tap(user => { ... }));}bootstrapApplication(App, {providers: [provideHttpClient(),{provide: APP_INITIALIZER,useFactory: initializeAppFactory,multi: true,deps: [HttpClient],},],});
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: ContentChildFunction;
Initializes a content child query. Consider using
contentChild.required
for queries that should always match.Create a child query in your component by declaring a class field and initializing it with the
contentChild()
function.@Component({...})export class TestComponent {headerEl = contentChild<ElementRef>('h'); // Signal<ElementRef|undefined>headerElElRequired = contentChild.required<ElementRef>('h'); // Signal<ElementRef>header = contentChild(MyHeader); // Signal<MyHeader|undefined>headerRequired = contentChild.required(MyHeader); // Signal<MyHeader>}
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/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;
Below are constants for LContainer indices to help us look up LContainer members without having to remember the specific indices. Uglify will inline these when minifying so there shouldn't be a cost.
variable Directive
const Directive: DirectiveDecorator;
Type of the Directive metadata.
variable DISCONNECTED_NODES
const DISCONNECTED_NODES: string;
variable EFFECTS_TO_SCHEDULE
const EFFECTS_TO_SCHEDULE: number;
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<readonly (() => void)[]>;
A multi-provider token for initialization functions that will run upon construction of an environment injector.
Note: As opposed to the
APP_INITIALIZER
token, theENVIRONMENT_INITIALIZER
functions are not awaited, hence they should not beasync
.
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 GLOBAL_PUBLISH_EXPANDO_KEY
const GLOBAL_PUBLISH_EXPANDO_KEY: string;
This value reflects the property on the window where the dev tools are patched (window.ng).
variable globalUtilsFunctions
const globalUtilsFunctions: { ɵgetDependenciesFromInjectable: typeof getDependenciesFromInjectable; ɵgetInjectorProviders: typeof getInjectorProviders; ɵgetInjectorResolutionPath: typeof getInjectorResolutionPath; ɵgetInjectorMetadata: typeof getInjectorMetadata; ɵsetProfiler: (profiler: ɵProfiler_2 | null) => void; getDirectiveMetadata: typeof getDirectiveMetadata; getComponent: typeof getComponent; getContext: typeof getContext; getListeners: typeof getListeners; getOwningComponent: typeof getOwningComponent; getHostElement: typeof ɵgetHostElement; getInjector: typeof getInjector; getRootComponents: typeof getRootComponents; getDirectives: typeof ɵgetDirectives; applyChanges: typeof applyChanges; isSignal: typeof isSignal;};
variable Host
const Host: HostDecorator;
Host decorator and metadata.
variable HOST
const HOST: number;
variable HOST_TAG_NAME
const HOST_TAG_NAME: InjectionToken<string>;
A token that can be used to inject the tag name of the host node.
### Injecting a tag name that is known to exist
@Directive()class MyDir {tagName: string = inject(HOST_TAG_NAME);}### Optionally injecting a tag name
@Directive()class MyDir {tagName: string | null = inject(HOST_TAG_NAME, {optional: true});}
variable HostBinding
const HostBinding: HostBindingDecorator;
variable HostListener
const HostListener: HostListenerDecorator;
variable HYDRATION
const HYDRATION: number;
variable HYDRATION_INFO_KEY
const HYDRATION_INFO_KEY: string;
variable I18N_DATA
const I18N_DATA: string;
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: InputFunction;
The
input
function allows declaration of Angular inputs in directives and components.There are two variants of inputs that can be declared:
1. **Optional inputs** with an initial value. 2. **Required inputs** that consumers need to set.
By default, the
input
function will declare optional inputs that always have an initial value. Required inputs can be declared using theinput.required()
function.Inputs are signals. The values of an input are exposed as a
Signal
. The signal always holds the latest value of the input that is bound from the parent.To use signal-based inputs, import
input
from@angular/core
.import {input} from '@angular/core`;Inside your component, introduce a new class member and initialize it with a call to
input
orinput.required
.@Component({...})export class UserProfileComponent {firstName = input<string>(); // Signal<string|undefined>lastName = input.required<string>(); // Signal<string>age = input(0) // Signal<number>}Inside your component template, you can display values of the inputs by calling the signal.
<span>{{firstName()}}</span>
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/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 model
const model: ModelFunction;
model
declares a writeable signal that is exposed as an input/output pair on the containing directive.The input name is taken either from the class member or from the
alias
option. The output name is generated by taking the input name and appendingChange
.To use
model()
, import the function from@angular/core
.import {model} from '@angular/core`;Inside your component, introduce a new class member and initialize it with a call to
model
ormodel.required
.@Directive({...})export class MyDir {firstName = model<string>(); // ModelSignal<string|undefined>lastName = model.required<string>(); // ModelSignal<string>age = model(0); // ModelSignal<number>}Inside your component template, you can display the value of a
model
by calling the signal.<span>{{firstName()}}</span>Updating the
model
is equivalent to updating a writable signal.updateName(newFirstName: string): void {this.firstName.set(newFirstName);}
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 ɵCONTAINER_HEADER_OFFSET
const ɵCONTAINER_HEADER_OFFSET: number;
Size of LContainer's header. Represents the index after which all views in the container will be inserted. We need to keep a record of current views so we know which views are already in the DOM (and don't need to be re-added) and so we can remove views from the DOM when they are no longer required.
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 ɵDEFER_BLOCK_CONFIG
const ɵDEFER_BLOCK_CONFIG: InjectionToken<ɵDeferBlockConfig>;
**INTERNAL**, token used for configuring defer block behavior.
variable ɵDEFER_BLOCK_DEPENDENCY_INTERCEPTOR
const ɵDEFER_BLOCK_DEPENDENCY_INTERCEPTOR: InjectionToken<ɵDeferBlockDependencyInterceptor>;
**INTERNAL**, avoid referencing it in application code. * Injector token that allows to provide
DeferBlockDependencyInterceptor
class implementation.This token is only injected in devMode
variable ɵdepsTracker
const ɵdepsTracker: DepsTracker;
The deps tracker to be used in the current Angular app in dev mode.
variable ɵglobal
const ɵglobal: any;
variable ɵIMAGE_CONFIG
const ɵIMAGE_CONFIG: InjectionToken<ɵImageConfig>;
Injection token that configures the image optimized image functionality. See ImageConfig for additional information about parameters that can be used.
See Also
variable ɵIMAGE_CONFIG_DEFAULTS
const ɵIMAGE_CONFIG_DEFAULTS: ɵImageConfig;
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 ɵINPUT_SIGNAL_BRAND_READ_TYPE
const ɵINPUT_SIGNAL_BRAND_READ_TYPE: Symbol;
variable ɵINPUT_SIGNAL_BRAND_WRITE_TYPE
const ɵINPUT_SIGNAL_BRAND_WRITE_TYPE: Symbol;
variable ɵINTERNAL_APPLICATION_ERROR_HANDLER
const ɵINTERNAL_APPLICATION_ERROR_HANDLER: InjectionToken<(e: any) => void>;
InjectionToken
used to configure how to call theErrorHandler
.NgZone
is provided by default today so the default (and only) implementation for this is callingErrorHandler.handleError
outside of the Angular zone.
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 ɵJSACTION_EVENT_CONTRACT
const ɵJSACTION_EVENT_CONTRACT: InjectionToken<EventContractDetails>;
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 ɵPROVIDED_NG_ZONE
const ɵPROVIDED_NG_ZONE: InjectionToken<boolean>;
Internal token used to verify that
provideZoneChangeDetection
is not used with the bootstrapModule API.
variable ɵSSR_CONTENT_INTEGRITY_MARKER
const ɵSSR_CONTENT_INTEGRITY_MARKER: string;
Marker used in a comment node to ensure hydration content integrity
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 ɵUSE_RUNTIME_DEPS_TRACKER_FOR_JIT
const ɵUSE_RUNTIME_DEPS_TRACKER_FOR_JIT: boolean;
Indicates whether to use the runtime dependency tracker for scope calculation in JIT compilation. The value "false" means the old code path based on patching scope info into the types will be used.
Deprecated
For migration purposes only, to be removed soon.
variable ɵWRITABLE_SIGNAL
const ɵWRITABLE_SIGNAL: Symbol;
Symbol used distinguish
WritableSignal
from other non-writable signals and functions.
variable ɵXSS_SECURITY_URL
const ɵXSS_SECURITY_URL: string;
URL for the XSS security documentation.
variable ɵZONELESS_ENABLED
const ɵZONELESS_ENABLED: InjectionToken<boolean>;
Token used to indicate if zoneless was enabled via provideZonelessChangeDetection().
variable PACKAGE_ROOT_URL
const PACKAGE_ROOT_URL: InjectionToken<string>;
A DI token that indicates the root directory of the application
Deprecated
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<readonly (() => 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_TEMPLATE_CONSUMER
const REACTIVE_TEMPLATE_CONSUMER: number;
variable RENDERER
const RENDERER: number;
variable Self
const Self: SelfDecorator;
Self decorator and metadata.
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/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/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: ViewChildFunction;
Initializes a view child query.
Consider using
viewChild.required
for queries that should always match.Create a child query in your component by declaring a class field and initializing it with the
viewChild()
function.@Component({template: '<div #el></div><my-component #cmp />'})export class TestComponent {divEl = viewChild<ElementRef>('el'); // Signal<ElementRef|undefined>divElRequired = viewChild.required<ElementRef>('el'); // Signal<ElementRef>cmp = viewChild(MyComponent); // Signal<MyComponent|undefined>cmpRequired = viewChild.required(MyComponent); // Signal<MyComponent>}
variable ViewChild
const ViewChild: ViewChildDecorator;
ViewChild decorator and metadata.
variable ViewChildren
const ViewChildren: ViewChildrenDecorator;
ViewChildren decorator and metadata.
Functions
function afterNextRender
afterNextRender: { <E = never, W = never, M = never>( spec: { earlyRead?: () => E; write?: (...args: ɵFirstAvailable<[E]>) => W; mixedReadWrite?: (...args: ɵFirstAvailable<[W, E]>) => M; read?: (...args: ɵFirstAvailable<[M, W, E]>) => void; }, options?: Omit<AfterRenderOptions, 'phase'> ): AfterRenderRef; (callback: VoidFunction, options?: AfterRenderOptions): AfterRenderRef;};
Register callbacks to be invoked the next time the application finishes rendering, during the specified phases. The available phases are: -
earlyRead
Use this phase to **read** from the DOM before a subsequentwrite
callback, for example to perform custom layout that the browser doesn't natively support. Prefer theread
phase if reading can wait until after the write phase. **Never** write to the DOM in this phase. -write
Use this phase to **write** to the DOM. **Never** read from the DOM in this phase. -mixedReadWrite
Use this phase to read from and write to the DOM simultaneously. **Never** use this phase if it is possible to divide the work among the other phases instead. -read
Use this phase to **read** from the DOM. **Never** write to the DOM in this phase.You should prefer using the
read
andwrite
phases over theearlyRead
andmixedReadWrite
phases when possible, to avoid performance degradation.Note that: - Callbacks run in the following phase order *once, after the next render*: 1.
earlyRead
2.write
3.mixedReadWrite
4.read
- Callbacks in the same phase run in the order they are registered. - Callbacks run on browser platforms only, they will not run on the server.The first phase callback to run as part of this spec will receive no parameters. Each subsequent phase callback in this spec will receive the return value of the previously run phase callback as a parameter. This can be used to coordinate work across multiple phases.
Angular is unable to verify or enforce that phases are used correctly, and instead relies on each developer to follow the guidelines documented for each value and carefully choose the appropriate one, refactoring their code if necessary. By doing so, Angular is better able to minimize the performance degradation associated with manual DOM access, ensuring the best experience for the end users of your application or library.
Components are not guaranteed to be [hydrated](guide/hydration) before the callback runs. You must use caution when directly reading or writing the DOM and layout.
Parameter spec
The callback functions to register
Parameter options
Options to control the behavior of the callback
Use
afterNextRender
to read or write the DOM once, for example to initialize a non-Angular library.### Example
@Component({selector: 'my-chart-cmp',template: `<div #chart>{{ ... }}</div>`,})export class MyChartCmp {@ViewChild('chart') chartRef: ElementRef;chart: MyChart|null;constructor() {afterNextRender({write: () => {this.chart = new MyChart(this.chartRef.nativeElement);}});}}Register a callback to be invoked the next time the application finishes rendering, during the
mixedReadWrite
phase.You should prefer specifying an explicit phase for the callback instead, or you risk significant performance degradation.
Note that the callback will run - in the order it was registered - on browser platforms only - during the
mixedReadWrite
phaseComponents are not guaranteed to be [hydrated](guide/hydration) before the callback runs. You must use caution when directly reading or writing the DOM and layout.
Parameter callback
A callback function to register
Parameter options
Options to control the behavior of the callback
Use
afterNextRender
to read or write the DOM once, for example to initialize a non-Angular library.### Example
@Component({selector: 'my-chart-cmp',template: `<div #chart>{{ ... }}</div>`,})export class MyChartCmp {@ViewChild('chart') chartRef: ElementRef;chart: MyChart|null;constructor() {afterNextRender({write: () => {this.chart = new MyChart(this.chartRef.nativeElement);}});}}
function afterRender
afterRender: { <E = never, W = never, M = never>( spec: { earlyRead?: () => E; write?: (...args: ɵFirstAvailable<[E]>) => W; mixedReadWrite?: (...args: ɵFirstAvailable<[W, E]>) => M; read?: (...args: ɵFirstAvailable<[M, W, E]>) => void; }, options?: Omit<AfterRenderOptions, 'phase'> ): AfterRenderRef; (callback: VoidFunction, options?: AfterRenderOptions): AfterRenderRef;};
Register callbacks to be invoked each time the application finishes rendering, during the specified phases. The available phases are: -
earlyRead
Use this phase to **read** from the DOM before a subsequentwrite
callback, for example to perform custom layout that the browser doesn't natively support. Prefer theread
phase if reading can wait until after the write phase. **Never** write to the DOM in this phase. -write
Use this phase to **write** to the DOM. **Never** read from the DOM in this phase. -mixedReadWrite
Use this phase to read from and write to the DOM simultaneously. **Never** use this phase if it is possible to divide the work among the other phases instead. -read
Use this phase to **read** from the DOM. **Never** write to the DOM in this phase.You should prefer using the
read
andwrite
phases over theearlyRead
andmixedReadWrite
phases when possible, to avoid performance degradation.Note that: - Callbacks run in the following phase order *after each render*: 1.
earlyRead
2.write
3.mixedReadWrite
4.read
- Callbacks in the same phase run in the order they are registered. - Callbacks run on browser platforms only, they will not run on the server.The first phase callback to run as part of this spec will receive no parameters. Each subsequent phase callback in this spec will receive the return value of the previously run phase callback as a parameter. This can be used to coordinate work across multiple phases.
Angular is unable to verify or enforce that phases are used correctly, and instead relies on each developer to follow the guidelines documented for each value and carefully choose the appropriate one, refactoring their code if necessary. By doing so, Angular is better able to minimize the performance degradation associated with manual DOM access, ensuring the best experience for the end users of your application or library.
Components are not guaranteed to be [hydrated](guide/hydration) before the callback runs. You must use caution when directly reading or writing the DOM and layout.
Parameter spec
The callback functions to register
Parameter options
Options to control the behavior of the callback
Use
afterRender
to read or write the DOM after each render.### Example
@Component({selector: 'my-cmp',template: `<span #content>{{ ... }}</span>`,})export class MyComponent {@ViewChild('content') contentRef: ElementRef;constructor() {afterRender({read: () => {console.log('content height: ' + this.contentRef.nativeElement.scrollHeight);}});}}Register a callback to be invoked each time the application finishes rendering, during the
mixedReadWrite
phase.You should prefer specifying an explicit phase for the callback instead, or you risk significant performance degradation.
Note that the callback will run - in the order it was registered - once per render - on browser platforms only - during the
mixedReadWrite
phaseComponents are not guaranteed to be [hydrated](guide/hydration) before the callback runs. You must use caution when directly reading or writing the DOM and layout.
Parameter callback
A callback function to register
Parameter options
Options to control the behavior of the callback
Use
afterRender
to read or write the DOM after each render.### Example
@Component({selector: 'my-cmp',template: `<span #content>{{ ... }}</span>`,})export class MyComponent {@ViewChild('content') contentRef: ElementRef;constructor() {afterRender({read: () => {console.log('content height: ' + this.contentRef.nativeElement.scrollHeight);}});}}
function applyChanges
applyChanges: (component: {}) => void;
Marks a component for check (in case of OnPush components) and synchronously performs change detection on the application this component belongs to.
Parameter component
Component to .
function asNativeElements
asNativeElements: (debugEls: DebugElement[]) => any;
function assertInInjectionContext
assertInInjectionContext: (debugFn: Function) => void;
Asserts that the current stack frame is within an [injection context](guide/di/dependency-injection-context) and has access to
inject
.Parameter debugFn
a reference to the function making the assertion (used for the error message).
function assertNotInReactiveContext
assertNotInReactiveContext: (debugFn: Function, extraContext?: string) => void;
Asserts that the current stack frame is not within a reactive context. Useful to disallow certain code from running inside a reactive context (see toSignal).
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 booleanAttribute
booleanAttribute: (value: unknown) => boolean;
Transforms a value (typically a string) to a boolean. Intended to be used as a transform function of an input.
```typescript @Input({ transform: booleanAttribute }) status!: boolean; ```
Parameter value
Value to be transformed.
function computed
computed: <T>( computation: () => T, options?: CreateComputedOptions<T>) => Signal<T>;
Create a computed
Signal
which derives a reactive value from an expression.
function contentChildren
contentChildren: { <LocatorT>( locator: ProviderToken<LocatorT> | string, opts?: { descendants?: boolean; read?: undefined } ): Signal<ReadonlyArray<LocatorT>>; <LocatorT, ReadT>( locator: string | ProviderToken<LocatorT>, opts: { descendants?: boolean; read: ProviderToken<ReadT> } ): () => readonly ReadT[];};
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 hostElement = 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, {hostElement, 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);componentRef.changeDetectorRef.detectChanges();Parameter component
Component class reference.
Parameter options
Set of options to use: *
environmentInjector
: AnEnvironmentInjector
instance to be used for the component. *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/di/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.
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 getComponent
getComponent: <T>(element: Element) => T | null;
Retrieves the component instance associated with a given DOM element.
Given the following DOM structure:
<app-root><div><child-comp></child-comp></div></app-root>Calling
getComponent
on<child-comp>
will return the instance ofChildComponent
associated with this DOM element.Calling the function on
<app-root>
will return theMyApp
instance.Parameter element
DOM element from which the component should be retrieved.
Returns
Component instance associated with the element or
null
if there is no component associated with it.
function getContext
getContext: <T extends {}>(element: Element) => T | null;
If inside an embedded view (e.g.
*ngIf
or*ngFor
), retrieves the context of the embedded view that the element is part of. Otherwise retrieves the instance of the component whose view owns the element (in this case, the result is the same as callinggetOwningComponent
).Parameter element
Element for which to get the surrounding component instance.
Returns
Instance of the component that is around the element or null if the element isn't inside any component.
function getDebugNode
getDebugNode: (nativeNode: any) => DebugNode | null;
function getDependenciesFromInjectable
getDependenciesFromInjectable: <T>( injector: Injector, token: Type<T> | InjectionToken<T>) => | { instance: T; dependencies: Omit<InjectedService, 'injectedIn'>[] } | undefined;
Discovers the dependencies of an injectable instance. Provides DI information about each dependency that the injectable was instantiated with, including where they were provided from.
Parameter injector
An injector instance
Parameter token
a DI token that was constructed by the given injector instance
Returns
an object that contains the created instance of token as well as all of the dependencies that it was instantiated with OR undefined if the token was not created within the given injector.
function getDirectiveMetadata
getDirectiveMetadata: ( directiveOrComponentInstance: any) => ɵComponentDebugMetadata | DirectiveDebugMetadata | null;
Returns the debug (partial) metadata for a particular directive or component instance. The function accepts an instance of a directive or component and returns the corresponding metadata.
Parameter directiveOrComponentInstance
Instance of a directive or component
Returns
metadata of the passed directive or component
function getInjector
getInjector: (elementOrDir: Element | {}) => Injector;
Retrieves an
Injector
associated with an element, component or directive instance.Parameter elementOrDir
DOM element, component or directive instance for which to retrieve the injector.
Returns
Injector associated with the element, component or directive instance.
function getInjectorMetadata
getInjectorMetadata: ( injector: Injector) => | { type: 'element'; source: RElement } | { type: 'environment'; source: string | null } | { type: 'null'; source: null } | null;
Given an injector, this function will return an object containing the type and source of the injector.
| | type | source | |--------------|-------------|-------------------------------------------------------------| | NodeInjector | element | DOM element that created this injector | | R3Injector | environment |
injector.source
| | NullInjector | null | null |Parameter injector
the Injector to get metadata for
Returns
an object containing the type and source of the given injector. If the injector metadata cannot be determined, returns null.
function getInjectorProviders
getInjectorProviders: (injector: Injector) => ɵProviderRecord[];
Gets the providers configured on an injector.
Parameter injector
the injector to lookup the providers of
Returns
ProviderRecord[] an array of objects representing the providers of the given injector
function getInjectorResolutionPath
getInjectorResolutionPath: (injector: Injector) => Injector[];
function getListeners
getListeners: (element: Element) => Listener[];
Retrieves a list of event listeners associated with a DOM element. The list does include host listeners, but it does not include event listeners defined outside of the Angular context (e.g. through
addEventListener
).Given the following DOM structure:
<app-root><div (click)="doSomething()"></div></app-root>Calling
getListeners
on<div>
will return an object that looks as follows:{name: 'click',element: <div>,callback: () => doSomething(),useCapture: false}Parameter element
Element for which the DOM listeners should be retrieved.
Returns
Array of event listeners on the DOM element.
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 getOwningComponent
getOwningComponent: <T>(elementOrDir: Element | {}) => T | null;
Retrieves the component instance whose view contains the DOM element.
For example, if
<child-comp>
is used in the template of<app-comp>
(i.e. aViewChild
of<app-comp>
), callinggetOwningComponent
on<child-comp>
would return<app-comp>
.Parameter elementOrDir
DOM element, component or directive instance for which to retrieve the root components.
Returns
Component instance whose view owns the DOM element or null if the element is not part of a component view.
function getPlatform
getPlatform: () => PlatformRef | null;
Returns the current platform.
function getRootComponents
getRootComponents: (elementOrDir: Element | {}) => {}[];
Retrieves all root components associated with a DOM element, directive or component instance. Root components are those which have been bootstrapped by Angular.
Parameter elementOrDir
DOM element, component or directive instance for which to retrieve the root components.
Returns
Root components associated with the target object.
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/components/importing).
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; (token: HostAttributeToken): string; (token: HostAttributeToken, options: { optional: true }): string; (token: HostAttributeToken, options: { optional: false }): string;};
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.
Parameter token
A token that represents a static attribute on the host node that should be injected.
Returns
Value of the attribute if it exists.
Throws
If called outside of a supported context or the attribute does not exist.
Parameter token
A token that represents a static attribute on the host node that should be injected.
Returns
Value of the attribute if it exists, otherwise
null
.Throws
If called outside of a supported context.
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 () => 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/components/importing) 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 numberAttribute
numberAttribute: (value: unknown, fallbackValue?: number) => number;
Transforms a value (typically a string) to a number. Intended to be used as a transform function of an input.
Parameter value
Value to be transformed.
Parameter fallbackValue
Value to use if the provided value can't be parsed as a number.
```typescript @Input({ transform: numberAttribute }) id!: number; ```
function output
output: <T = void>(opts?: OutputOptions) => OutputEmitterRef<T>;
The
output
function allows declaration of Angular outputs in directives and components.You can use outputs to emit values to parent directives and component. Parents can subscribe to changes via:
- template event bindings. For example,
(myOutput)="doSomething($event)"
- programmatic subscription by usingOutputRef#subscribe
.To use
output()
, import the function from@angular/core
.import {output} from '@angular/core';Inside your component, introduce a new class member and initialize it with a call to
output
.@Directive({...})export class MyDir {nameChange = output<string>(); // OutputEmitterRef<string>onClick = output(); // OutputEmitterRef<void>}You can emit values to consumers of your directive, by using the
emit
method fromOutputEmitterRef
.updateName(newName: string): void {this.nameChange.emit(newName);}{"showTypesInSignaturePreview": true}
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) => { regular: Set<string>; capture: Set<string> };
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. event types that need to be replayed
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 ɵ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?: Array<Provider | StaticProvider> | null, name?: string) => Injector;
Create a new
Injector
which is configured using adefType
ofInjectorType<any>
s.
function ɵdetectChangesInViewIfRequired
ɵdetectChangesInViewIfRequired: ( lView: LView, notifyErrorHandler: boolean, isFirstPass: boolean, zonelessEnabled: boolean) => void;
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)
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 ɵgenerateStandaloneInDeclarationsError
ɵgenerateStandaloneInDeclarationsError: ( type: Type<any>, location: string) => string;
function ɵgetAsyncClassMetadataFn
ɵgetAsyncClassMetadataFn: ( type: Type<unknown>) => (() => Promise<Array<Type<unknown>>>) | null;
If a given component has unresolved async metadata - returns a reference to a function that applies component metadata after resolving defer-loadable dependencies. Otherwise - this function returns
null
.
function ɵgetDebugNode
ɵgetDebugNode: (nativeNode: any) => DebugNode | null;
function ɵgetDeferBlocks
ɵgetDeferBlocks: (lView: LView, deferBlocks: ɵDeferBlockDetails[]) => void;
Retrieves all defer blocks in a given LView.
Parameter lView
lView with defer blocks
Parameter deferBlocks
defer block aggregator array
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.
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.
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
[Internationalization (i18n) Guide](guide/i18n)
function ɵgetOutputDestroyRef
ɵgetOutputDestroyRef: (ref: OutputRef<unknown>) => DestroyRef | undefined;
Gets the owning
DestroyRef
for the given output.
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 ɵinternalProvideZoneChangeDetection
ɵinternalProvideZoneChangeDetection: ({ ngZoneFactory, ignoreChangesOutsideZone, scheduleInRootZone,}: { ngZoneFactory?: () => NgZone; ignoreChangesOutsideZone?: boolean; scheduleInRootZone?: boolean;}) => StaticProvider[];
function ɵisBoundToModule
ɵisBoundToModule: <C>(cf: ComponentFactory<C>) => boolean;
function ɵisComponentDefPendingResolution
ɵisComponentDefPendingResolution: (type: Type<any>) => 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 ɵɵcomponentInstance
ɵɵcomponentInstance: () => unknown;
Instruction that returns the component instance in which the current instruction is executing. This is a constant-time version of
nextContent
for the case where we know that we need the component instance specifically, rather than the context of a particular template.
function ɵɵconditional
ɵɵconditional: <T>(matchingTemplateIndex: number, contextValue?: T) => void;
The conditional instruction represents the basic building block on the runtime side to support built-in "if" and "switch". On the high level this instruction is responsible for adding and removing views selected by a conditional expression.
Parameter matchingTemplateIndex
Index of a template TNode representing a conditional view to be inserted; -1 represents a special case when there is no view to insert.
Parameter contextValue
Value that should be exposed as the context of the conditional.
function ɵɵcontentQuery
ɵɵcontentQuery: <T>( directiveIndex: number, predicate: ProviderToken<unknown> | string | 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 ɵɵcontentQuerySignal
ɵɵcontentQuerySignal: <T>( directiveIndex: number, target: Signal<T>, predicate: ProviderToken<unknown> | string[], flags: QueryFlags, read?: any) => void;
Creates a new content query and binds it to a signal created by an authoring function.
Parameter directiveIndex
Current directive index
Parameter target
The target signal to which the query should be bound
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
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 ɵɵdeclareLet
ɵɵdeclareLet: (index: number) => typeof ɵɵdeclareLet;
Declares an
@let
at a specific data slot. Returns itself to allow chaining.Parameter index
Index at which to declare the
@let
.
function ɵɵdefer
ɵɵdefer: ( index: number, primaryTmplIndex: number, dependencyResolverFn?: DependencyResolverFn | null, loadingTmplIndex?: number | null, placeholderTmplIndex?: number | null, errorTmplIndex?: number | null, loadingConfigIndex?: number | null, placeholderConfigIndex?: number | null, enableTimerScheduling?: typeof ɵɵdeferEnableTimerScheduling) => void;
Creates runtime data structures for defer blocks.
Parameter index
Index of the
defer
instruction.Parameter primaryTmplIndex
Index of the template with the primary block content.
Parameter dependencyResolverFn
Function that contains dependencies for this defer block.
Parameter loadingTmplIndex
Index of the template with the loading block content.
Parameter placeholderTmplIndex
Index of the template with the placeholder block content.
Parameter errorTmplIndex
Index of the template with the error block content.
Parameter loadingConfigIndex
Index in the constants array of the configuration of the loading. block.
Parameter placeholderConfigIndex
Index in the constants array of the configuration of the placeholder block.
Parameter enableTimerScheduling
Function that enables timer-related scheduling if
after
orminimum
parameters are setup on the@loading
or@placeholder
blocks.
function ɵɵdeferEnableTimerScheduling
ɵɵdeferEnableTimerScheduling: ( tView: TView, tDetails: TDeferBlockDetails, placeholderConfigIndex?: number | null, loadingConfigIndex?: number | null) => void;