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 :: react time input 
Javascript :: expres body parser 
Javascript :: javascript template literals html 
Javascript :: redux react redux 
Javascript :: Open temporary webpage js 
Javascript :: reverse a string while keeping spaces in javascript 
Javascript :: vue js use component everywhere 
Javascript :: set body id js 
Javascript :: get param from url jquery 
Javascript :: prevstate in react 
Javascript :: anchor click event angular refresh page 
Javascript :: js fetch 
Javascript :: context api react 
Javascript :: jquery dynamic event handling 
Javascript :: component vs container react 
Javascript :: object copy in javascript 
Javascript :: js nuxt read/set cookie 
Javascript :: remove the first item from an array 
Javascript :: angular build deploy url 
Javascript :: javascript continue with for Loop 
Javascript :: javascript how to remove the last character of the string 
Javascript :: add button dynamically in javascript 
Javascript :: Reusable Alpine.js components 
Javascript :: pop up notification using jquery 
Javascript :: how to comment out code in react js 
Javascript :: rect to rect collision 
Javascript :: jquery add class except this 
Javascript :: react bootstrap table 
Javascript :: js array random 
Javascript :: add countdown timer to javascript quiz 
ADD CONTENT
Topic
Content
Source link
Name
4+7 =