Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

angular-clickable-click

DanielKucal158MIT0.1.2TypeScript support: included

Angular 2+ Directive setting 'cursor: pointer' for all elements using (click) directive

angular, angular2, angular4, click, clickable, event, style, directive, disabled, link, cursor, pointer

readme

Clickable (click) for Angular 2+

Angular 2+ Directive adding pointer cursor for elements using (click) directive. Respects [disabled] input.

Installation

  1. Get it from npm i angular-clickable-click --save
  2. Import ClickableClickModule

     import { ClickableClickModule } from 'angular-clickable-click';
    
     @NgModule({
       // ...
       imports: [ClickableClickModule],
       // ...
     })
     class AppModule {}

Usage (click here for a demo)

@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;
}