我想利用打字稿分型,为您的Youtube API的数据在这里:https://github.com/Bolisov/typings-gapi/tree/master/gapi.client.youtube-v3您可能需要一个合适的加载器来处理这种文件类型。打字稿
我使用离子框架,我收到以下后我不离子在下面的一行代码即成错误:
gapi.client.load("client", "v3");
Module parse failed: /Users/yoko/Desktop/myApp/node_modules/gapi/lib/gapi.coffee Unexpected token (1:17)
You may need an appropriate loader to handle this file type.
| config = require './config'
|
| module.exports =
这是api.coffee怎么看起来像
config = require './config'
module.exports =
server:
setApiKey: (apiKey) ->
config.api.key = apiKey
load: (apiName, apiVersion, callback) ->
@[apiName] = require "./#{apiName}/#{apiVersion}"
callback()
这是什么意思?
意味着你需要设置cofeescript transpilation。 –
如何在角度项目中设置此项? –
需要使用加载程序,SystemJS或Webpack,或者您可以运行一个将文件编译为JS的监视任务,并包含这些文件 –