I have issue with getting data from HTML data attr to component.
In Template I have:
<button [attr.data-direction]="next" type="text" (click)="nextNotes()" [disabled]="checkPage(paginator)"> > </button>
And how can I call this data attr in class method after click? There is some ng workflow for that or purejs?
console.log(data)
<button #myBtn ..., then in your TS class you can retrieve the attribute withmyBtn.getAttribute('data-direction')ElementRef, you can retrieve it like thisconstructor(myBtn: ElementRef) { ... }, then you can try withmyBtn.nativeElement.getAttribute(...)