code: function (azurePromise) {
        var deferred = $q.defer();
        azurePromise.done(function (items) {
          deferred.resolve(items);
        }, function (err) {
          deferred.reject(err);
        });
        return deferred.promise;
      }
docs: This will accept the Azure promise and turn it into a angular promise. Elimiante the need for $scope.$apply in your controller.