* Iterates over local names for a given node and returns directive index * (or -1 if a local name points to an element). * * @param tNode static data of a node to check * @param selector selector to match * @returns directive index, -1 or null if a selector didn't match any of the local names
(tNode: TNode, selector: string)
| 326 | * @returns directive index, -1 or null if a selector didn't match any of the local names |
| 327 | */ |
| 328 | function getIdxOfMatchingSelector(tNode: TNode, selector: string): number | null { |
| 329 | const localNames = tNode.localNames; |
| 330 | if (localNames !== null) { |
| 331 | for (let i = 0; i < localNames.length; i += 2) { |
| 332 | if (localNames[i] === selector) { |
| 333 | return localNames[i + 1] as number; |
| 334 | } |
| 335 | } |
| 336 | } |
| 337 | return null; |
| 338 | } |
| 339 | |
| 340 | function createResultByTNodeType(tNode: TNode, currentView: LView): any { |
| 341 | if (tNode.type & (TNodeType.AnyRNode | TNodeType.ElementContainer)) { |
no outgoing calls
no test coverage detected
searching dependent graphs…