here is my code. ng-repeat
has no effect inside script for some reason. console output just has three {{item}}
strings. I expected the letters 'a', 'b', and 'c'. why is that?
<div ng-app ng-controller="controller">
<script type="text/javascript" ng-repeat="item in items">
var v = '{{item}}';
console.log(v);
</script>
</div>
function controller($scope) {
$scope.items = ['a', 'b', 'c'];
}
By design, AngularJS does not template inside of <script>
tags. This makes reasonable enough sense, since it is meant for generating HTML, not JavaScript.