Skip to content

Instantly share code, notes, and snippets.

@vjwilson
Last active August 29, 2015 14:06
Show Gist options
  • Save vjwilson/802a5a9398b31fbe7654 to your computer and use it in GitHub Desktop.
Save vjwilson/802a5a9398b31fbe7654 to your computer and use it in GitHub Desktop.
Rangular: Rails and Angular "Have You Been To"
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