MCPcopy Index your code
hub / github.com/angular/angular / directive

Method directive

packages/platform-browser/src/dom/debug/by.ts:54–56  ·  view source on GitHub ↗

* 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>)

Source from the content-addressed store, hash-verified

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
59function elementMatches(n: any, selector: string): boolean {

Callers

nothing calls this directly

Calls 1

indexOfMethod · 0.80

Tested by

no test coverage detected