This file contains hidden or 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
Array.prototype.push = function(x) { | |
return [].concat(this, x); | |
}; | |
Array.prototype.pop = function() { | |
return this.slice(0, this.length-1); | |
}; | |
Array.prototype.unshift = function(x) { | |
return [].concat(x, this); |
This file contains hidden or 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
// las funciones con await deben de tener el prefijo async | |
async function main () { | |
try { | |
const result = await pedirPermisos(); | |
// dependemos del servicio anterior para realizar el siguiente | |
if (result) { | |
const geolocation = await llamarAPIGoogleMaps(); | |
console.log(geolocation); |
This file contains hidden or 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
app.directive('ngEnter', function() { | |
return function(scope, element, attrs) { | |
element.bind("keydown keypress", function(event) { | |
if(event.which === 13) { | |
scope.$apply(function(){ | |
scope.$eval(attrs.ngEnter); | |
}); | |
event.preventDefault(); | |
} | |
}); |
NewerOlder