Last active
August 29, 2015 14:06
-
-
Save vjwilson/802a5a9398b31fbe7654 to your computer and use it in GitHub Desktop.
Rangular: Rails and Angular "Have You Been To"
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
REST back-end in Rails | |
front-end app in Angular | |
Add ng-app attribute to div you want Angular app to control | |
<div id='container' ng-app='HaveYouBeenTo'> | |
(Debugging in Chrome JS console: click on element in DOM, and then $0 returns that node in console) | |
browser object to get current lat/long: | |
window.navigator.geolocation.getCurrentPosition( function(){console.log(arguments)}) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment