(click)
for Angular 4+
Clickable Angular 4+ Directive adding pointer cursor for elements using (click)
directive.
Installation
- Get it from
npm i angular-clickable-click --save
- Import
ClickableClickModule
import { ClickableClickModule } from 'angular-clickable-click'; @NgModule({ // ... imports: [ClickableClickModule], // ... }) class AppModule {}
click here for a demo)
Usage (@Component({ selector: 'app', template: ` <div (click)="isDisabled = true" [disabled]="isDisabled"> I am <b *ngIf="isDisabled">no longer</b> clickable </div> ` }) export class AppComponent { public isDisabled: boolean = false; }