Skip to content

Instantly share code, notes, and snippets.

@davemo
Last active November 16, 2017 13:23
injectorsauce
(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']);
});
});
})();
@devmark
Copy link

devmark commented Jul 17, 2015

Hello,

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