MCPcopy
hub / github.com/angular/angular / getPipeNotFoundErrorMessage

Function getPipeNotFoundErrorMessage

packages/core/src/render3/pipe.ts:144–157  ·  view source on GitHub ↗

* Generates a helpful error message for the user when a pipe is not found. * * @param name Name of the missing pipe * @returns The error message

(name: string)

Source from the content-addressed store, hash-verified

142 * @returns The error message
143 */
144function getPipeNotFoundErrorMessage(name: string) {
145 const lView = getLView();
146 const declarationLView = lView[DECLARATION_COMPONENT_VIEW] as LView<Type<unknown>>;
147 const context = declarationLView[CONTEXT];
148 const hostIsStandalone = isHostComponentStandalone(lView);
149 const componentInfoMessage = context ? ` in the '${context.constructor.name}' component` : '';
150 const verifyMessage = `Verify that it is ${
151 hostIsStandalone
152 ? "included in the '@Component.imports' of this component"
153 : 'declared or imported in this module'
154 }`;
155 const errorMessage = `The pipe '${name}' could not be found${componentInfoMessage}. ${verifyMessage}`;
156 return errorMessage;
157}
158
159/**
160 * Invokes a pipe with 1 arguments.

Callers 1

getPipeDefFunction · 0.85

Calls 2

getLViewFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…