[英]How do I require('google-spreadsheet') in Ionic2?
I've been searching for a while for tutorials about how to import this module to angular2 - Ionic2 to be specific - but without luck. 我一直在寻找有关如何将此模块导入angular2的教程- 具体来说是Ionic2-但没有运气。
Is there any tutorial on how to implement this module to ionic 2 ? 是否有关于如何将该模块实现为ionic 2的教程?
I tried this but with no success(based on answer below): 我尝试了这个但没有成功(基于下面的答案):
let googlespreadsheet = require('google-spreadsheet');
which produced the error: 产生错误:
Cannot find name 'require'
Since google-spreadsheet
is not a Typescript module, you cannot import it into your Typescript file. 由于
google-spreadsheet
不是Typescript模块,因此您无法将其导入到Typescript文件中。 You can, however, require it: 但是,您可以要求它:
let googlespreadsheet = require('google-spreadsheet');
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.