MCPcopy Create free account
hub / github.com/angular/angular / ɵɵproperty

Function ɵɵproperty

packages/core/src/render3/instructions/property.ts:38–52  ·  view source on GitHub ↗
(
  propName: string,
  value: T,
  sanitizer?: SanitizerFn | null,
)

Source from the content-addressed store, hash-verified

36 * @codeGenApi
37 */
38export function ɵɵproperty<T>(
39 propName: string,
40 value: T,
41 sanitizer?: SanitizerFn | null,
42): typeof ɵɵproperty {
43 const lView = getLView();
44 const bindingIndex = nextBindingIndex();
45 if (bindingUpdated(lView, bindingIndex, value)) {
46 const tView = getTView();
47 const tNode = getSelectedTNode();
48 setPropertyAndInputs(tNode, lView, propName, value, lView[RENDERER], sanitizer);
49 ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, bindingIndex);
50 }
51 return ɵɵproperty;
52}
53
54/**
55 * Given `<div style="..." my-dir>` and `MyDir` with `@Input('style')` we need to write to

Callers 3

idempotentUpdateFunction · 0.85
updateTextFunction · 0.85

Calls 7

getLViewFunction · 0.90
nextBindingIndexFunction · 0.90
bindingUpdatedFunction · 0.90
getTViewFunction · 0.90
getSelectedTNodeFunction · 0.90
setPropertyAndInputsFunction · 0.90

Tested by

no test coverage detected