What is the best place to store application configuration settings in AngularJS? This could be things like application constants, lookups etc. which could be used both from cont
Add this to have access to a global variable
app.run(function ($rootScope) {
$rootScope.globalVariable = 'Amadou'; //global variable
});
Now if you want to use it from your controller
function appNameCtrl($scope, $rootScope){
$rootScope.globalVariable = 'Modji';
}
In you view
My name is {{globalVariable}}