Ionic Deploy: have to click "Check for updates" twice (100% code from "deploy from scratch")

I started playing around with Ionic Deploy today and just copy pasted the code from directly into my project. In general it works fine, but I have the slight problem that I always have to click the “Check for updates” twice.

In the console and in the http request I see that correctly wants to give an update the first time I click the button. From my console:

Ionic Deploy: Update available: true

But still I have to click the button a second time, doing the same http request and getting the same answer (and console.logs) only then the button “download update” appears and I can download and apply the update.

Any idea? I already checked the plugin code, but couldn’t find anything that could cause this behavious - otherwise I wouldn’t get the console.log output I showd above :confused:


For some reason I needed a $scope.$apply() after $scope.hasUpdate = hasUpdate; from the code example.

Can someone from Ionic Services team please check if this is a general problem or if this was only me?