forty-cdk
llms.txt

Error codes

FORCDK-TREE-004

Thrown by forty-cdk/tree.

[forty-cdk/tree] FORCDK-TREE-004: [forTreeNodeDragHandle] must be used inside a [forTreeNodeDrag] element.

Cause

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

Where it comes from

projects/forty-cdk/tree/src/tree-node-drag-handle.ts:28

Read the tree documentation