AUR0161

Error Message

AUR0161: Expression error: unexpected keyword "of": "{{expression}}"

Description

This error occurs when the keyword of appears where the expression parser does not expect it. of is used in Aurelia template syntax such as repeat.for="item of items", but it is not a general-purpose operator inside all expressions.

Example Trigger

<!-- ❌ "of" used outside repeat.for -->
<div textcontent.bind="item of items"></div>

Solution

  • Use repeat.for for iteration.

<!-- ✅ -->
<div repeat.for="item of items">${item}</div>

Troubleshooting

  • Check for accidental copy/paste of repeat.for syntax into a normal binding.

Last updated

Was this helpful?