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

Function verifyDirectivesHaveSelector

packages/core/src/render3/jit/module.ts:309–315  ·  view source on GitHub ↗
(type: Type<any>)

Source from the content-addressed store, hash-verified

307 }
308
309 function verifyDirectivesHaveSelector(type: Type<any>): void {
310 type = resolveForwardRef(type);
311 const def = getDirectiveDef(type);
312 if (!getComponentDef(type) && def && def.selectors.length == 0) {
313 errors.push(`Directive ${stringifyForError(type)} has no selector, please add it!`);
314 }
315 }
316
317 function verifyNotStandalone(type: Type<any>, moduleType: NgModuleType): void {
318 type = resolveForwardRef(type);

Callers

nothing calls this directly

Calls 5

resolveForwardRefFunction · 0.90
getDirectiveDefFunction · 0.90
getComponentDefFunction · 0.90
stringifyForErrorFunction · 0.90
pushMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…