[英]How do I close the panel when clicked on 'x' button and click on the screen using angularjs?(new to angular)
Here is my HTML code for my button 这是我的按钮的HTML代码
<button class="btn btn-outlined " ng-click="vm.showCommentBox1()">Notify All</button>
<div class="comment-box custom saveAll" ng-if=""><div class="panel panel-default">
<div class="panel-heading">
<button type="button" class="close" aria-label="Close" ng-click="comment=true" title="Close comment box"><span aria-hidden="true">×</span>
</button>
<h3 class="panel-title blue-30">Comment</h3>
</div>
<div class="panel-body">
<form>
<div class="form-group">
<textarea class="form-control bg-white" ng-model=""
placeholder="Add your description"></textarea>
</div>
</form>
</div>
</div>
</div>
so when i click the 'x' button the panel should get closed 所以当我点击“x”按钮时,面板应该关闭
只需在所需元素上使用ng-if="comment===true"
,以便在通过按“x”按钮将注释设置为true时删除元素。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.