Skip to content

Instantly share code, notes, and snippets.

@ramiresnas
Created December 8, 2017 10:15
Show Gist options
  • Save ramiresnas/6c482826ec1e8fa537c4a4fe607a1b99 to your computer and use it in GitHub Desktop.
Save ramiresnas/6c482826ec1e8fa537c4a4fe607a1b99 to your computer and use it in GitHub Desktop.
Acessando this dentro de uma função anônimo
var x = 0;
ngOnInit() {
var changeMapLocation = changeMapLocation();
let self = this
if(window.navigator.geolocation){
navigator.geolocation.getCurrentPosition(function(position) {
self.x = 10;
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment