Skip to content

Instantly share code, notes, and snippets.

Last active Nov 16, 2017
What would you like to do?
(function() {
var $injector = angular.injector(['ng']);
$injector.invoke(function($http) {
// this works!
$http.get("/auth/csrf_token").then(function(response) {
angular.module("app").constant("CSRF_TOKEN", response.csrf_token);
angular.bootstrap(document, ['app']);
Copy link

devmark commented Jul 17, 2015


How this can make sure "my client" calling "/auth/csrf_token"?
I think client side should be load from server side which include csrf token when bootstraping interface

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment