Since the Beta 4, my views don't update

I tested again one at a time and only the DB test fails now :confused:.
I have to precise that the DB test fails only when I use SqlStorage, with LocalStorage it works fine.

@iignatov sorry I make you confuse maybe but thank you to follow that with me.

These issues all sound like the symptoms of zones not working correctly and not triggering change detection. For people having problems updating I would say to make sure that you are including the angular2-polyfills.js script in your index.html, which includes zone.js.

I had the same problem. I started a new project and I made sure to have the angular2-polyfills.js in my index file. The only solution I found was to use import {NgZone} and then do the update of the array with the data from LocalStorage inside the this.zone.run…

Is this a known bug? It started happening after I updated to beta.4.

Also, in my project this is only happening with LocalStorage. I have other views that connect to a REST API and they update correctly once the data is in the array.

A short update: I made some research in the past days about this problem and I found out the following similar issues filed in the Angular 2 repo:

Therefore I would say that this behavior was really caused by a bug and that NgZone is just a workaround that is not needed anymore because the issue should be fixed by the following commits in beta.6:

I would suggest you to update your projects to beta.6 instead of using NgZone on every line.

3 Likes