( index: number, lView: LView, type: TNodeType.Element | TNodeType.ElementContainer, name: string, directiveMatcher: DirectiveMatcherStrategy, bindingsEnabled: boolean, attrsIndex?: number | null, localRefsIndex?: number, )
| 24 | import {resolveDirectives, type DirectiveMatcherStrategy} from './directives'; |
| 25 | |
| 26 | export function directiveHostFirstCreatePass( |
| 27 | index: number, |
| 28 | lView: LView, |
| 29 | type: TNodeType.Element | TNodeType.ElementContainer, |
| 30 | name: string, |
| 31 | directiveMatcher: DirectiveMatcherStrategy, |
| 32 | bindingsEnabled: boolean, |
| 33 | attrsIndex?: number | null, |
| 34 | localRefsIndex?: number, |
| 35 | ): TElementNode | TElementContainerNode { |
| 36 | const tView = lView[TVIEW]; |
| 37 | ngDevMode && assertFirstCreatePass(tView); |
| 38 | const tViewConsts = tView.consts; |
| 39 | const attrs = getConstant<TAttributes>(tViewConsts, attrsIndex); |
| 40 | const tNode = getOrCreateTNode(tView, index, type, name, attrs) as |
| 41 | | TElementNode |
| 42 | | TElementContainerNode; |
| 43 | |
| 44 | if (bindingsEnabled) { |
| 45 | resolveDirectives( |
| 46 | tView, |
| 47 | lView, |
| 48 | tNode, |
| 49 | getConstant<string[]>(tViewConsts, localRefsIndex), |
| 50 | directiveMatcher, |
| 51 | ); |
| 52 | } |
| 53 | |
| 54 | // Merge the template attrs last so that they have the highest priority. |
| 55 | tNode.mergedAttrs = mergeHostAttrs(tNode.mergedAttrs, tNode.attrs); |
| 56 | |
| 57 | if (tNode.attrs !== null) { |
| 58 | computeStaticStyling(tNode, tNode.attrs, false); |
| 59 | } |
| 60 | |
| 61 | if (tNode.mergedAttrs !== null) { |
| 62 | computeStaticStyling(tNode, tNode.mergedAttrs, true); |
| 63 | } |
| 64 | |
| 65 | if (tView.queries !== null) { |
| 66 | tView.queries.elementStart(tView, tNode); |
| 67 | } |
| 68 | |
| 69 | return tNode; |
| 70 | } |
| 71 | |
| 72 | export function directiveHostEndFirstCreatePass(tView: TView, tNode: TNode) { |
| 73 | ngDevMode && assertFirstCreatePass(tView); |
no test coverage detected
searching dependent graphs…