I am having a weird problem with not being able to use underscore functions inside either the {{}} or inside the ng-repeat and other expressions. My exact test function was
{{_.last([1,2,3,4])}}
... right in the HTML of the page.
I am able to see the correct answer (4) only if I do this in my controller:
$scope._ = _;
I tried to inject _ as a factory into my main application module and then inject that into my controller, but it doen't seem to inject it into the $scope.
Can anyone see the mistake I am making? Or is there a mechanism there that would prevent the underscore library from getting into the $scope? I am using angular v.1.0.7 and a recent version of underscore (not sure of the exact version number, but it is within the last 3 weeks).