使用API获取要在音频标签中播放的声音的URL
查看
<img src="../img/play.svg" alt="Play" ng-click="playSound('exampleWord')" width="48"/>
控制器:
$scope.playSound=function(input){
$scope.audio={};
soundFetch.getSound(input).success(function(data){
$scope.audio=data;
});
}
soundFetch是调用getSound函数的服务。返回的数据是歌曲的URL。 我如何在点击img标签后播放声音。当前出现错误
Error: [$interpolate:interr]
。