(index: number, value = '')
| 32 | * @codeGenApi |
| 33 | */ |
| 34 | export function ɵɵtext(index: number, value = ''): void { |
| 35 | const lView = getLView(); |
| 36 | const tView = getTView(); |
| 37 | const adjustedIndex = index + HEADER_OFFSET; |
| 38 | |
| 39 | ngDevMode && assertTNodeCreationIndex(lView, index); |
| 40 | |
| 41 | const tNode = tView.firstCreatePass |
| 42 | ? getOrCreateTNode(tView, adjustedIndex, TNodeType.Text, value, null) |
| 43 | : (tView.data[adjustedIndex] as TElementNode); |
| 44 | |
| 45 | const textNative = _locateOrCreateTextNode(tView, lView, tNode, value); |
| 46 | lView[adjustedIndex] = textNative; |
| 47 | |
| 48 | if (wasLastNodeCreated()) { |
| 49 | appendChild(tView, lView, textNative, tNode); |
| 50 | } |
| 51 | |
| 52 | // Text nodes are self closing. |
| 53 | setCurrentTNode(tNode, false); |
| 54 | } |
| 55 | |
| 56 | let _locateOrCreateTextNode: typeof locateOrCreateTextNodeImpl = ( |
| 57 | tView: TView, |
no test coverage detected
searching dependent graphs…