AUR0227
Error Message
Description
Cause
Solution
Example
import { bindable, customElement } from 'aurelia';
const mySymbol = Symbol('myPrivateData');
@customElement({ name: 'my-component', template: `<input value.bind="symbolProp">` })
export class MyComponent {
// Incorrect: Using @bindable on a property named with a Symbol
@bindable
[mySymbol]: string = 'initial value';
// Correct: Use a string name for bindable properties
@bindable
public stringProp: string = 'initial value';
}
// Accessing the component
// <my-component string-prop.bind="someValue"></my-component>
// Attempting to bind to [mySymbol] (symbolProp in the example) would fail.Debugging Tips
Last updated
Was this helpful?