I'm trying to use an angular variable as a JavaScript parameters like this:
<li ng-repeat="link in Links">
<button data-icon="gear" data-role="button" data-iconpos="right" type="button" id="bitrate_btn_{{ link.Code }}" class="bitrate_btn btn" onClick="play_live_ind({{link.Code}});">
{{ link.Title }} ( {{ link.Bitrate }} Kbps )
</button>
</li>
As you can see I'm calling a method called play_live_ind
like this:
play_live_ind({{link.Code}});
It's not working, as the page loads it exactly prints
play_live_ind({{link.Code}});
How can I pass the value of link to this JavaScript function?
This is a jw-player function that I can't rewrite it in angular because it has many function call on itself. So I need to call this function in javascript
So I just need a solution to pass the angular variable value to the Javascript function
ng-click
instead ofonClick
. – Pramod Karandikar 17 hours agoplay_live_ind
as$scope.play_live_ind = function(inputs) { // function body}
– Pramod Karandikar 16 hours ago