-
-
Save atefBB/ef1ae5ea3ea395604d896b0ccdc063ae to your computer and use it in GitHub Desktop.
injectorsauce
This file contains 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
(function() { | |
/** | |
* Bootstrap ng-app. | |
*/ | |
var $injector = angular.injector(['ng']); | |
$injector.invoke(function($http) { | |
$http.get("/auth/csrf_token").then(function(response) { | |
angular.module("app").constant("CSRF_TOKEN", response.csrf_token); | |
angular.bootstrap(document, ['app']); | |
}); | |
}); | |
}()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment