@fetmen wrote:
I currently do this: .controller('AppCtrl', function ($scope, $ionicModal, $timeout, $http, localStorageService, Benefits, $state, $rootScope, $ionicDeploy) { // With the new view caching in Ionic, Controllers are only called // when they are recreated or on app start, instead of every page change. // To listen for when this page is active (for example, to refresh data), // listen for the $ionicView.enter event: //$scope.$on('$ionicView.enter', function(e) { //}); $ionicDeploy.channel = 'dev'; $ionicDeploy.check().then(function (snapshotAvailable) { // When snapshotAvailable is true, you can apply the snapshot alert(snapshotAvailable); if (snapshotAvailable) { $ionicDeploy.download().then(function () { return $ionicDeploy.extract().then(function () { $ionicDeploy.load(); }); }); } });
Posts: 2
Participants: 1