AUR0178

Error Message

AUR0178: Expression error: arrow function with function body is not supported: "{{expression}}"

Description

Aurelia binding expressions only support concise arrow function bodies (single expression). Block bodies ({ ... }) are not supported.

Example Trigger

<!-- ❌ Block body -->
<div textcontent.bind="x => { return x + 1; }"></div>

Solution

  • Use an expression body, or move logic to a view-model method.

<!-- ✅ Expression body -->
<div textcontent.bind="x => x + 1"></div>

Last updated

Was this helpful?