<p class="原有的class" ng-hide=“{{item.amount}}=0” ng-repeat=“item in items track by $index”>
具体内容
</p>
item.amount is the quantity of the product. It will be dynamically modified when you click -.
This picture is the specific application scenario. When you click -, when it is equal to 0, you need to hide the p. The current situation is You can hide it by refreshing the page or jumping back, but you can't hide it immediately when you click -. Please tell me how to solve it. Because it is a list produced by ng-repeat, ng-hide cannot directly pass a Boolean value. Is there any other way to solve it?
用ng-hide="item.amount==0"
http://plnkr.co/edit/7KeNE5BtMJvRmjrafcr0