var ap = angular.module(‘two-way’, []);
ap.directive(‘dynamicUrl’, function () {
return {
restrict: ‘A’,
link: function postLink(scope, element, attr) {
element.attr(‘src’, attr.dynamicUrlSrc);
}
};
});
/*////comment
ap.controller(‘video’,function ($scope) {
var video={
path:“video.mp4”
};
$scope.video=video;
});
*/
app.controller(‘video’, function($scope,$http){
load_media();
function load_media() {
$http.get(‘http://localhost:3001/load-media’).success(function(data) {
$scope.videos = data;
});
};
});
it dosn’t work with ng-repeat when am trying to get path from mysql database he say video is not a function
any idea plz!!!