Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

angular disable click

try like this

<button  [disabled]="isDisabled" (click)="btnClick.emit($event)">
        <ng-content></ng-content>
</button>

@Input() isDisabled: boolean = false;
@Output() btnClick = new EventEmitter();
Use Output and By default the button click event won't work if button is disabled. take advantage of it

<my-button [isDisabled]="isDisabled" (btnClick)="click($event)"> submit </my-button>
Comment

angularjs onclick disable button click

<button id="submitRequest" onclick="this.disabled=true" class="btn btn-primary btn-active" ng-disabled="!frmRequest.$valid||!r.DataUseAgreement||(!chkBMT&&!chkOncore&&!chkCAISIS&&!chkLIMS&&!chkFCR)" ng-click="SaveData()"><i class="fa fa-save"></i> Submit</button>
 Run code snippet
Comment

PREVIOUS NEXT
Code Example
Javascript :: js set iframe src 
Javascript :: get all indexes for element in array javascript 
Javascript :: javascript get day 
Javascript :: localstorage setitem 
Javascript :: javascript randint 
Javascript :: continuos scrollling js 
Javascript :: javascript set time to start of day 12 am 
Javascript :: reverse every word in a string javascript 
Javascript :: ok that is something 
Javascript :: redondear decimales javascript 
Javascript :: convert an array to string javascript 
Javascript :: how do i check if JQuery checkbox is checked 
Javascript :: string to currency javascript 
Javascript :: js isset variable 
Javascript :: copying object javascript 
Javascript :: set _id to id 
Javascript :: print all days names of a month js javascript 
Javascript :: useNavigate history back 
Javascript :: js assignment operators 
Javascript :: how to check if exists in javascript 
Javascript :: encode jwt token javascript 
Javascript :: how to make back button react 
Javascript :: select in react js 
Javascript :: javascript button onclick reload page 
Javascript :: javascript Swapping Variables 
Javascript :: javascript format date mm/dd/yyyy 
Javascript :: javascript throw error inside then 
Javascript :: website design html css javascript 
Javascript :: node.js child processes 
Javascript :: javascript iterate over map keys 
ADD CONTENT
Topic
Content
Source link
Name
3+3 =