Currently my test setup is as such:
app.run(function($rootScope, $http, $location) {
url = $location.path() + '/raw';
$rootScope.test = 'hi';
$http.get(url).success(function(data) {
$rootScope.test = data.personality;
console.log($rootScope.test);//A
});})
app.controller("Big5", function ($scope, $http, $location, $rootScope) {
console.log($rootScope.test);}//B
The console.log at //A works as intended - it logs the JSON from the url. However, the console.log at //B just returns 'hi', the initial $rootscope.test variable. Any way to fix this?
I should mention that the page where this is needed calls the controller to render a graph.