forty-cdk
llms.txt

Error codes

FORCDK-FIELD-003

Thrown by forty-cdk/field.

[forty-cdk/field] FORCDK-FIELD-003: ForFieldAnchor must be used inside a [forField] element.

Cause

No FOR_FIELD_ANCHOR_CONTEXT provider is visible from ForFieldAnchor. 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 ForFieldAnchor inside a [forField] element, declaring any ng-template it lives in there too.

Where it comes from

projects/forty-cdk/field/src/field-anchor.ts:39

Read the field documentation