Skip to content

Instantly share code, notes, and snippets.

@fabiancarlos
Created February 7, 2014 18:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save fabiancarlos/8869305 to your computer and use it in GitHub Desktop.
Save fabiancarlos/8869305 to your computer and use it in GitHub Desktop.
Rails 4 w/t AngularJS, fix to use with turbolinks
var yourApp = angular.module('yourApp', []);
// fix 1
$(document).on('ready page:load', function(){
angular.bootstrap(document.body, ['yourApp']);
});
// or
// fix 2
$(document).on('ready page:load', function(){
angular.bootstrap(document, ['yourApp']);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment