0
How to pass content within config to global variables:
//meu config
app.run(function(editableOptions, $rootScope, $filter) {
editableOptions.theme = 'bs3'; // bootstrap3 theme. Can be also 'bs2', 'default'
$rootScope.$on('$routeChangeSuccess', function (e, current, pre) {
var c = current.$$route.originalPath.length;
$rootScope.action = current.$$route.originalPath;
});
});
In the view I want to reset a variable within HTML, is it possible? In the example below it does not work:
<script>
var action = '{{action}}';
</script>
I tried that:
//meu config
app.run(function(editableOptions, $rootScope, $filter) {
editableOptions.theme = 'bs3'; // bootstrap3 theme. Can be also 'bs2', 'default'
$rootScope.$on('$routeChangeSuccess', function (e, current, pre) {
var c = current.$$route.originalPath.length;
$rootScope.action = '<script> var action = "'+current.$$route.originalPath+'";</script>';
});
});
{{action}}
Didn’t work either.