AUR0773
Error Message
Description
Cause
import { watch } from '@aurelia/runtime-html';
// Incorrect: 'valueChangedHandler' method does not exist on the class
@watch({
expression: 'value',
changeHandler: 'valueChangedHandler' // Typo or missing method
})
export class MyViewModel {
value: string = 'test';
// Missing the required 'valueChangedHandler' method
// valueChangedHandler(newValue, oldValue) { /* ... */ }
}
// Incorrect: changeHandler name mismatch
@watch({
expression: 'count',
changeHandler: 'handleCountChange'
})
export class Counter {
count: number = 0;
// Method exists, but name doesn't match the changeHandler string
countChanged(newValue, oldValue) {
console.log(newValue, oldValue);
}
}Solution
Example
Debugging Tips
Last updated
Was this helpful?