I am trying to use lodash using it in ng-repeat directives, as follows:
<div ng-controller="GridController" ng-repeat="n in _.range(5)"> <div>Hello {{n}}</div> </div>
Be a GridController :
IndexModule.controller('GridController', function () { this._ = _ })
However, it does not work, and therefore nothing is repeated. If I change the directive to ng-repeat="i in [1,2,3,4,5]" , this will work.
lodash already enabled via <script> in <header> to angular . How can I make it work?
javascript angularjs lodash
diegoaguilar May 26 '14 at 3:01 2014-05-26 03:01
source share