Last active
August 29, 2015 13:58
-
-
Save leandrojo/9986653 to your computer and use it in GitHub Desktop.
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
| this.getCurrentPosition = function() { | |
| var position = $q.defer(); | |
| geolocation.getCurrentPosition(function(pos) { | |
| position.resolve(pos); | |
| }, function() { | |
| position.reject(); | |
| }); | |
| return position.promise; | |
| }; | |
| this.render = function() { | |
| this.getCurrentPosition.then(function(position) { | |
| // modifica aqui o dom | |
| }); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment