-
Notifications
You must be signed in to change notification settings - Fork 401
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Issue:
When you try to access a property that has a special character via t-model
you get the following error:
Uncaught (in promise) Error: Invalid t-model expression: "obj.$hello" (it should be assignable)
I'm not sure if this is expected or not. I wanted to create this issue because the error message had me scratching my head for a little while. It doesn't seem to be consistent with what works in something like a t-esc
. I can always access the property with the []
notation (as shown in the workaround below), and that handles the special characters without a problem.
Javascript:
setup() {
this.obj = useState({"$hello": "world"});
}
Template:
<input t-model="obj.$hello"/>
<p t-esc="obj.$hello"/>
Workaround:
<input t-model="obj['$hello']"/>
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working