* Match nodes that have the given directive present. * * @usageNotes * ### Example * * {@example platform-browser/dom/debug/ts/by/by.ts region='by_directive'}
(type: Type<any>)
| 52 | * {@example platform-browser/dom/debug/ts/by/by.ts region='by_directive'} |
| 53 | */ |
| 54 | static directive(type: Type<any>): Predicate<DebugNode> { |
| 55 | return (debugNode) => debugNode.providerTokens!.indexOf(type) !== -1; |
| 56 | } |
| 57 | } |
| 58 | |
| 59 | function elementMatches(n: any, selector: string): boolean { |