我正在使用https://github.com/christiansmith/ngGAPI
此服务帮助我获取Youtube的Google API Services V3。虽然我已经遵循指示。也有依赖性。但它不起作用。例如
angular
.module('app', [
"gapi"
])
.value('GoogleApp', {
apiKey: 'AIzaSyAm_1TROkfNgY-XYZABCDEGGHI',
clientId: 'NUMBERS.apps.googleusercontent.com',
scopes: [
'https://www.googleapis.com/auth/drive',
'https://www.googleapis.com/auth/youtube',
'https://www.googleapis.com/auth/userinfo.profile'
]
})
.controller('YoutubeController', ['$scope', 'Video', "Youtube", "GAPI",
function ($scope, Video, Youtube, GAPI) {
GAPI.init();
$scope.videos = Youtube.search({part: 'snippet', q: 'Sample Text to Search'})
}]);
包含Google Apis链接。但它给我的错误是GAPI.app.oauthToken is undefined
或某个时间gapi.auth is undefined
请帮忙
我在本地服务器http://localhost:3000/#/