In this tutorial I have explain about the get YouTube thumbnail using AngularJS
<html ng-app id="YoutubeApp">
<head>
<title>
How to get a YouTube video thumbnail dynamically from the YouTube API using AngularJS Tutorials</title>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.6/angular.min.js"></script>
<script src="http://code.jquery.com/jquery-1.7.2.min.js"></script>
<script>
function YoutubeController($scope) {
$scope.todos = [];
$scope.addVideo = function() {
$scope.todos.push({text:$scope.todoText, done:false});
$scope.todoText = '';
};
}
</script>
<style>
.youtube-image {
width: 150px;
height: 100px;
}
</style>
</head>
<body>
<h1>
How to get a YouTube video thumbnail dynamically from the YouTube API using AngularJS Tutorials
</h1>
<div ng-controller="YoutubeController">
<form ng-submit="addVideo()">
<label>(Like : www.youtube.com/watch?v=jebJ9itYTJE)</label>
<input type="text" ng-model="todoText" size="30"
placeholder="Enter Youtube Video Id here">
<input class="btn-primary" type="submit" value="add">
</form>
<span ng-repeat="todo in todos">
<img class="youtube-image" src="http://img.youtube.com/vi/{{todo.text}}/0.jpg" />
<br/>
</span>
</div>
</body>
</html>
Youtube Video URL : www.youtube.com/watch?v=jebJ9itYTJE
Video ID : jebJ9itYTJE
Enter the Video Id in Textbox
Output :
ReplyDeleteGet more Youtube Views using Youtube Thumbnail Facebook at Create Youtube Or download youtube thumbnail
or save youtube thumbnail using Create youtube
Most useful youtube tool to get more views