AUR0158
Error Message
AUR0158: Expression error: left hand side of expression is not assignable: "{{expression}}"
Description
This error occurs when attempting to assign a value to something that cannot be assigned to, such as literals, function calls, or complex expressions.
Common Scenarios
<!-- ❌ Wrong: Cannot assign to literals -->
<input value.two-way="'literal string'">
<input value.two-way="42">
<!-- ❌ Wrong: Cannot assign to function calls -->
<input value.two-way="getValue()">
<!-- ❌ Wrong: Cannot assign to complex expressions -->
<input value.two-way="user.firstName + user.lastName">
Solution
<!-- ✅ Correct: Assign to properties -->
<input value.two-way="userInput">
<input value.two-way="user.name">
<input value.two-way="items[index]">
<!-- ✅ Correct: Use one-way binding for read-only values -->
<input value.bind="getValue()">
<div textcontent.bind="user.firstName + user.lastName">
Last updated
Was this helpful?