forty-cdk
llms.txt

Error codes

FORCDK-VIRTUALIZATION-001

Thrown by forty-cdk/virtualization.

[forty-cdk/virtualization] FORCDK-VIRTUALIZATION-001: {consumer} must be used inside a [forVirtualViewport] element.

Cause

No FOR_VIRTUAL_VIEWPORT_CONTEXT provider is visible from {consumer}. Angular resolves a directive's dependencies at the template's declaration site rather than where it is stamped, so a piece declared in an ng-template outside the root resolves nothing even when it renders inside it.

Fix

Move {consumer} inside a [forVirtualViewport] element, declaring any ng-template it lives in there too.

Where it comes from

projects/forty-cdk/virtualization/src/virtual-viewport-context.ts:33

Read the virtualization documentation

A value in braces is filled in when the message is reported, so the sentence in your console names the piece, input or value that failed.