My controller:
$scope.totals = totals;
My template (works as expected for html injection):
{{totals}}
But what I need is to access the variable totals
in a script in the template, like so:
<script>
var totals = ????;
// do stuff with totals
</script>
I've tried $scope.totals
, $totals
, {{totals}}
, etc, with no avail. I would appreciate any insight, thanks!
EDIT:
The following is a jsfiddle of my controller and template. Inside of the template I'm wanting to insert a script that uses the $scope.totals
variable.