Skip to content

Instantly share code, notes, and snippets.

@ayamomiji
Last active November 10, 2017 11:16
Show Gist options
  • Save ayamomiji/4736614 to your computer and use it in GitHub Desktop.
Save ayamomiji/4736614 to your computer and use it in GitHub Desktop.
turbolinks + angularjs
bootstrapAngular = ->
$('[ng-app]').each ->
module = $(this).attr('ng-app')
angular.bootstrap(this, [module])
$(document).on('page:load', bootstrapAngular)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment