这是我的 代码
<form name="downloadForm" role="form" ng-submit="download()">
<label>
files :
</label>
<div class="form-group">
<label class="radio left-buffer-medium" ng-repeat="file in product.issueDTO.source track by file.id">
<input type="radio" name="fileRadio" ng-model="$parent.selectedFile.id" ng-value="{{file.id}}"
ng-checked="($parent.selectedFile.id == file.id)">{{file.sourceType.extension}}
<small>{{file.fileDescription}}</small>
</label>
</div>
<button type="submit" class="btn btn-primary">
<span class="glyphicon glyphicon-download-alt" ></span>
<span translate="qstoreappApp.product.publicproducts.download"></span>
</button>
<br>
<audio controls>
<source src="????" type="audio/mpeg">
Your browser does not support the audio element.
</audio>
</form>
我用它来选择要下载的文件,一切正常。我想从HTML5使用mp3播放器,我的问题是。我如何向src发送补丁? 我尝试过使用file.filePath,但它不起作用。
答案 0 :(得分:0)
您可以使用ng-src
<source ng-src="http://localhost:3000/tracks/{{ ngmodelSong}}" type="audio/mpeg">