( tNode: TContainerNode, declarationLView: LView, declarationTView: TView, index: number, templateFn: ComponentTemplate<any> | null, decls: number, vars: number, flags?: TNodeFlags, )
| 53 | } from './shared'; |
| 54 | |
| 55 | function templateCreate( |
| 56 | tNode: TContainerNode, |
| 57 | declarationLView: LView, |
| 58 | declarationTView: TView, |
| 59 | index: number, |
| 60 | templateFn: ComponentTemplate<any> | null, |
| 61 | decls: number, |
| 62 | vars: number, |
| 63 | flags?: TNodeFlags, |
| 64 | ) { |
| 65 | if (declarationTView.firstCreatePass) { |
| 66 | // Merge the template attrs last so that they have the highest priority. |
| 67 | tNode.mergedAttrs = mergeHostAttrs(tNode.mergedAttrs, tNode.attrs); |
| 68 | |
| 69 | const embeddedTView = (tNode.tView = createTView( |
| 70 | TViewType.Embedded, |
| 71 | tNode, |
| 72 | templateFn, |
| 73 | decls, |
| 74 | vars, |
| 75 | declarationTView.directiveRegistry, |
| 76 | declarationTView.pipeRegistry, |
| 77 | null, |
| 78 | declarationTView.schemas, |
| 79 | declarationTView.consts, |
| 80 | null /* ssrId */, |
| 81 | )); |
| 82 | |
| 83 | if (declarationTView.queries !== null) { |
| 84 | declarationTView.queries.template(declarationTView, tNode); |
| 85 | embeddedTView.queries = declarationTView.queries.embeddedTView(tNode); |
| 86 | } |
| 87 | } |
| 88 | |
| 89 | if (flags) { |
| 90 | tNode.flags |= flags; |
| 91 | } |
| 92 | setCurrentTNode(tNode, false); |
| 93 | |
| 94 | const comment = _locateOrCreateContainerAnchor( |
| 95 | declarationTView, |
| 96 | declarationLView, |
| 97 | tNode, |
| 98 | index, |
| 99 | ) as RComment; |
| 100 | |
| 101 | if (wasLastNodeCreated()) { |
| 102 | appendChild(declarationTView, declarationLView, comment, tNode); |
| 103 | } |
| 104 | attachPatchData(comment, declarationLView); |
| 105 | |
| 106 | const lContainer = createLContainer(comment, declarationLView, comment, tNode); |
| 107 | declarationLView[index + HEADER_OFFSET] = lContainer; |
| 108 | addToEndOfViewTree(declarationLView, lContainer); |
| 109 | |
| 110 | // If hydration is enabled, looks up dehydrated views in the DOM |
| 111 | // using hydration annotation info and stores those views on LContainer. |
| 112 | // In client-only mode, this function is a noop. |
no test coverage detected
searching dependent graphs…