-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.html
More file actions
30 lines (29 loc) · 898 Bytes
/
example.html
File metadata and controls
30 lines (29 loc) · 898 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<!DOCTYPE html>
<html lang="en" ng-app="example">
<head>
<meta charset="UTF-8">
<title>Check API calls</title>
</head>
<body>
<div ng-controller="DemoCtrl">
<ul>
<li data-ng-repeat="video in videos.items">{{video.snippet.title}}</li>
</ul>
</div>
<script src="vendor/angular.js"></script>
<script src="src/angular-google-api-wrapper.js"></script>
<script>
angular.module('example', ["angularGoogleApiWrapper"])
.config(['gapiServiceProvider', function (gapiServiceProvider) {
gapiServiceProvider.setApiKey('AIzaSyDUkvcl6xcEa2pJVlrPZyWBs76dPBEdNGs');
}])
.controller('DemoCtrl', ['$scope', 'googleYouTubeAPI', function ($scope, googleYouTubeAPI) {
$scope.videos = googleYouTubeAPI.playlistItems.list({
part: 'snippet',
playlistId: 'UUhYheBnVeCfhCmqZfCUdJQw', // Ionic channel's video playlist
maxResults: 50
});
}]);
</script>
</body>
</html>