I’m using the latest v2 beta.
Inside my class I have a property isOffline to keep track of the connection status.
I initialize this property and inside my component’s constructor I have 2 event listeners for ‘online’ and ‘offline’. Both listeners update the this.isOffline property.
Inside my page’s HTML I display the property via [(ngModel)].
When the page is loaded the initial connection status is displayed. The even listeners should work properly, as the updated status can be displayed with console.log inside the listeners. However, my UI does not update the status.
I have also tried to put the isOffline inside an object (so this.connection.isOffline instead of this.isOffline), but when I try to update the isOffline property I get an error stating I cannot change read only properties.
What should I do to get this working as expected?
Thanks in advance.