Created
November 9, 2012 15:34
-
-
Save royosherove/4046346 to your computer and use it in GitHub Desktop.
simple angular js to search and display youtube videos
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<head > | |
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.0.2/angular.min.js"></script> | |
<script type="text/javascript"> | |
function PhoneListCtrl($scope, $http){ | |
var dataurl ='http://gdata.youtube.com/feeds/api/videos?q="string%20calculator"%20kata%20-tekpub%20-movie&orderby=rating&alt=json'; | |
$http.get(dataurl).success(function(data){ | |
$scope.vids = data.feed.entry; | |
}); | |
} | |
</script> | |
</head> | |
<body > | |
<div ng-app ng-controller="PhoneListCtrl"> | |
<table> | |
<tr ng-repeat="vid in vids | filter:query"> | |
<td> | |
<iframe width="300" height="169" src="{{vid.media$group.media$content[0].url}}" frameborder="0" allowfullscreen></iframe> | |
<td> | |
<td> | |
<h3>{{vid.title.$t}}</h3> | |
{{vid.content.$t}} | |
<td> | |
</tr> | |
</table> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Page not found.