Created
February 7, 2014 18:56
-
-
Save fabiancarlos/8869305 to your computer and use it in GitHub Desktop.
Rails 4 w/t AngularJS, fix to use with turbolinks
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
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