[英]How to hide or disable angular button, once user click the button
我對angular非常陌生,我有 servicenow 經驗,我需要事件形式的幫助
<div>
<button class="btn btn-primary" ng-click="$root.trigger()">Create this ticket</button>
<hr/>
<h3 class="show-font"><b>OPTIONAL INFORMATION</b></h3>
<!--<p class="text-muted small">This will help us understand who should be looking into your ticket.</p>-->
</div>
創建一個變量使其默認為true;
isShow=true;
如果元素中有條件,則給出按鈕
ng-if="isShow"
當你點擊給點擊 function 到 html ng-click="test()"
更改
test(){
this.isShow=!this.isShow;
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.