How to pass variable to “data-target=” angular 2 April 14, 2023 by Tarik You could used attribute binding. Something like that: [attr.data-target]="'#' + theme.themeId"