Skip to content

Instantly share code, notes, and snippets.

@doblesesays
Created December 27, 2016 15:25
Show Gist options
  • Save doblesesays/8474d85d2892d63d1dd2fdb0a9b76506 to your computer and use it in GitHub Desktop.
Save doblesesays/8474d85d2892d63d1dd2fdb0a9b76506 to your computer and use it in GitHub Desktop.
lineas 50 a 70
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