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 view I want to reset a variable within HTML, is it possible? The example below does not work:
<script>
var action = '{{action}}';
</script>
I tried this:
//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}}
It also did not work.