86
rated 0 times
[
89]
[
3]
/ answers: 1 / hits: 28787
/ 11 Years ago, tue, october 15, 2013, 12:00:00
I'm trying to implement a video element in an angular JS app and the ng-src won't read the scope variable
I'm using 1.2.0-rc.2
<!DOCTYPE html>
<html ng-app=ngView>
<head>
<script src=http://code.angularjs.org/1.2.0-rc.2/angular.min.js></script>
<script>
var app = angular.module('ngView', []);
function MyControl($scope){
$scope.file = '1234.mp4';
}
</script>
</head>
<body ng-controller=MyControl>
<video controls ng-src=http://www.thebigdot.com/{{file}}></video>
</body>
</html>
If I use a much older version AngularJS lib, it works.
cdnjs.cloudflare.com/ajax/libs/angular.js/1.0.3/angular.min.js (works)
Is this a bug in the latest release or has it been disabled on purpose? What is the work around ?
More From » angularjs