How to pass variable to "data-target=" angular 2
To pass a variable in Angular 7 you can use it just like:
[attr.data-target] = "theme.themeId"
Yes exactly you can use
*ngFor="a of Array; index as i;"
and
[attr.data-target]="'#test' + i"
and
name="test{{i}}
You could used attribute binding. Something like that:
[attr.data-target]="'#' + theme.themeId"