disable href angular code example
Example 1: disabled a click
// CSS
.not-active {
pointer-events: none;
cursor: default;
text-decoration: none;
color: black;
}
// HTML
<a href="link.html" class="not-active">Link</a>
Example 2: make link disabled in angular
<a [class.disabled]="apiReturned ? null: true" [href]="apiReturned ? 'https://stackoverflow.com/users/9442497/ldb' : null" >Click Me!</a>