Created
December 27, 2016 15:25
-
-
Save doblesesays/8474d85d2892d63d1dd2fdb0a9b76506 to your computer and use it in GitHub Desktop.
lineas 50 a 70
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var list = snapshot.val(); | |
console.log("list.zipcodes " +list.zipcodes); | |
if(list.zipcodes.hasOwnProperty(dir)){ | |
var result = list.zipcodes[dir]; | |
caller.resolve({liquorEstore:result, address: dir.text}); | |
} | |
else | |
caller.reject(dir); | |
}, function(errorObject) { | |
caller.reject(dir); | |
}); | |
return caller.promise; | |
} | |
self.getOutOfZoneLists = function(dir){ | |
var caller = $q.defer(); | |
Utils.showMessage($filter('translate')("Loading products...")); | |
var ref = new Firebase(FBURL); | |
ref.child('products_meta').once('value', function(snapshot) { | |
var products_meta = snapshot.val(); | |
ref.child('list').once('value', function(snapshot) { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment