angularjs - issue with condition in angular with if -
in code ng-if doesn't seems verify conditions. 'hello' displays before table.
<div ng-repeat="(key, value) in data"> <h3>{{key}}</h3> <div ng-if="_.isnumber('hello')"> <h2>hello</h2> </div> <table class="table table-striped table-bordered table-condensed table-hover"> <tr ng-repeat="(k,v) in value"> <td><strong>{{k}}</strong></td> <td>{{v}}</td> </tr> </table> </div>
if need use function in view, need bind scope first.
i'm not sure if can bind underscore try
$scope._ = _;
Comments
Post a Comment