如果value为零,我需要隐藏元素。我试过了:
<span ng-hide="currentCount.appointment == 0">{{currentCount.appointment}}</span>
在console.log(currentCount.appointment)
我看到currentCount.appointment
的更改值为零后,为什么span块不会隐藏?
完整代码:
request.success(function () {
$scope.currentCount = CounterNotificationService.setCounterInc('appointment', 'decr');
console.log($scope.currentCount.appointment);
});
答案 0 :(得分:1)
答案 1 :(得分:0)
试试这个:
<span ng-hide="currentCount.appointment == '0'">{{currentCount.appointment}}</span>