I been having problem with disabling an href using Angular and Typescript and I am not sure if I am going in the correct path.
Is there a better way to do something like this? looking for something like this with the red circle
ts
ReadOnlyStyleGuideNotes: boolean;
ngOnInit() {
this.ReadOnlyStyleGuideNotes = true;
}
html
<a href="#"
*ngIf="note.Edited || note.Removed"
(click)="restoreDefault(note)"
style="font-size: 12px"
data-disabled="readOnlyStyleGuideNotes">
restore defaults
</a>
css class
a[data-disabled=true] {
color: currentColor;
cursor: not-allowed;
opacity: 0.5;
text-decoration: none;
}
