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 ?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…