Trying to apply custom attributes within a ngFor
loop is proving challenging for me.
<ng-container *ngFor="let a of this.current_items?.areas; let i = index">
...
I've made several attempts:
<div class="productBatchArea" custom-data='{{ a.title }}'>
// ERROR: Cannot bind to 'custom-data' as it is not a recognized property of 'div'
<div class="productBatchArea" [data-teste]="a.title">
// ERROR: Cannot bind to 'data-teste' as it is not a recognized property of 'div'
<div class="productBatchArea" data-teste="{{ a.title }}">
// ERROR: Cannot bind to 'teste' as it is not a recognized property of 'div'
Is there something I'm missing in my approach?