ng-disable-link
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

NgDisableLink

Directive to disable anchor tag in Angular

Install

Install the package by running npm install ng-disable-link

Usage

Import the module NgDisableLinkModule in the module where the directive will be used Use the directive ngDisableLink with a boolean value in anchor tag

<a href="https://example.com" [ngDisableLink]="!enabled">Example link</a>

In the component, you can implement custom logic to enable/disable the link

enabled = false;

Styling

The anchor tag when disabled will have the aria-disabled attribute set to true, so css selector a[aria-disabled="true"] can be used for styling

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.0
    22
    • latest

Version History

Package Sidebar

Install

npm i ng-disable-link

Weekly Downloads

23

Version

1.0.0

License

ISC

Unpacked Size

82 kB

Total Files

23

Last publish

Collaborators

  • sriram.s