Array subscription in Aurelia
问题 Let's say I have an array of elements and in addition to displaying the list in my app, I want to sync the list to the server with HttpClient . How can I observe changes to the array? I tried: @inject(ObserverLocator) export class ViewModel { constructor(obsLoc) { this.list = []; obsLoc.getObserver(this, 'list'); .subscribe(li => console.log(li)); } } But I got neither error nor log message. 回答1: getObserver returns a property observer which will notify you when the ViewModel class instance's