我无法在html中看到这个问题,但我可以让show / hide适用于某个部分,但不适用于其他部分。它是ng-model
。我正在检查是否存在反馈,如果确实显示了一个区域,则隐藏另一个区域。它只适用于清单。清单显示和隐藏正确,但如果隐藏清单则需要显示消息。我知道这很简单,但不知道为什么它不会显示/隐藏,但我认为它归结为使用feedback.length
多一次。我能这样做吗?我在ng-if="feedback.length>0"
的div中尝试了ng-show="feedback.length>0"
和myMessage
。清单是唯一隐藏的清单。
<div class="col-md-3" id="myMessage" ng-if="feedback.length>0">
<div class="alert alert-success">You have already submitted feedback for this user.</div>
</div>
<div class="col-md-3" id="checkList" ng-if="feedback.length==0">
<div class="row">
<div class="panel panel-default questionHolder2">
<div class="panel-heading"><strong>Thesis</strong></div>
<div class="panel-body">
1. After reading, but looking back at the paper now, can you summarize or paraphrase the author's argument or main point that s/he is trying to convey to the reader?
</div>
</div>
</div>
</div>
&#13;