137
rated 0 times
[
144]
[
7]
/ answers: 1 / hits: 71050
/ 10 Years ago, mon, may 26, 2014, 12:00:00
I'm trying to use lodash use it at ng-repeat
directives, in this way:
<div ng-controller=GridController ng-repeat=n in _.range(5)>
<div>Hello {{n}}</div>
</div>
Being GridController
:
IndexModule.controller('GridController', function () {
this._ = _
})
However is not working and so, nothing being repeated. If I change the directive to ng-repeat=i in [1,2,3,4,5]
it'll work.
lodash
is already included via <script>
at <header>
before angular
. How can I make it work?
More From » angularjs