i want to add a global viable to the scope of all controllers
i can do it manually in each controller like...
if variable is
<script>
var base_url ="http://localhost/myapp/";
</stript>
then
app.controller('myController',[$scope','$window',
function($scope, $window) {
$scope.base_url = $window.base_url;
}
]);
i can also use $rootScope or service
but i want to add this variable to the scope of each controller dynamically. So as there any possible way to do this?