Reputation: 201
I try using angular for override tokens in twitch player.
<...height="{{settings.height}}" width="{{settings.width}}"...{{channel}}&
auto_play={{settings.auto_play}}&start_volume{{settings.start_volume}}" /></object>
Im use ng-repear with (key,value).
<div ng-repeat="(channel,meta) in players">
//player is here
</div>
Settings is a global object. But when I try to load the page, player loads as he got tokens {{channel}},{{settings.width}} (not values). I think it happens because player on the page starts to load instantly, but angular need the time for replace. How to fix this ?
Upvotes: 1
Views: 808
Reputation: 17678
Your problem is indeed happening because the DOM is being parsed before Angular has loaded. To work around this, you can create a directive to output your twitch player, since that won't be evaluated until after the Angular bootstrap has happened.
Upvotes: 2