forty-cdk
llms.txt

Error codes

FORCDK-AVATAR-002

Thrown by forty-cdk/avatar.

[forty-cdk/avatar] FORCDK-AVATAR-002: ForAvatarImage must be used inside a [forAvatar] element.

Cause

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

Where it comes from

projects/forty-cdk/avatar/src/avatar-context.ts:107

Read the avatar documentation