Reputation: 56179
How to create id in element in template when I have passed parameter ? I have tried something like
<button id="p_"+{{key}} >TEST</button>
but in rendered HTML id is just p_ . Can someone tell me how to achieve this ?
Upvotes: 1
Views: 55
Reputation: 55932
<button id="p_{{key}}">TEST</button>
you need the key to be Inside the quotes
I'm assuming you were using +
to concat strings. I don't believe html supports any operations like that.
Upvotes: 4