Try with ngAttr directive (ng-attr-id) to prevent this kind of situation. It let angular create the original attribute at the right time
How to create id using expression with angular
-
15-06-2023 - |
Question
I have a directive with the following code as the template:
<video id="{{id}}" src="" class="video-js vjs-default-skin" controls preload="auto" width="auto" height="auto">
</video>
The problem is that the id is not being evaluated.
How can make the angular eval the expression for the ID
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow