Wednesday, April 25, 2018

Disable Dom elements(Button,Anchor,Dropdownlist) using class in angular 2

Attribute Directives example


Disable Dom elements(Button,Anchor,Dropdownlist) using class in angular 2 


HTML

.disabled {
                pointer-eventsnone;
                cursordefault;
            }


<a href="javascript:void(0);" (click)="OpenItem();" [class.disabled]="disableAnchorClass">Open Video</a>

<button type="button" (click)="Disable()">Disable</button>

 Component


DisableControl() {
            this.disableAnchorClass = 'disabled';
    }

No comments:

Post a Comment

Jquery Select and Change selector and event .How to Post data using jquery to mvc and web api action methods

Jquery :Change event in Jquery Method: Demo     $("#drpCountry").change(function () {             var id = $("#DrpCoun...