简体   繁体   English

如何将Amazon AWS-SDK导入/集成到ionic2?

[英]How to import/integrate amazon aws-sdk to ionic2?

Ionic2 is Typescript based, and Amazon is providing javascript only version of its library. Ionic2是基于Typescript的,并且Amazon正在提供其库的仅JavaScript版本。

Is it possible to integrate the Amazon aws-sdk into an Ionic2 app? 是否可以将Amazon aws-sdk集成到Ionic2应用程序中?

I have tried multiple methods including creating a typings file (and tsd), and trying to work out aws-cognito-angular2-quickstart but no luck so far... 我尝试了多种方法,包括创建类型文件(和tsd),并尝试得出aws-cognito-angular2-quickstart,但到目前为止还算运气...

Is creating an external javascript library and integrating it into the typescript code my only option? 创建外部JavaScript库并将其集成到打字稿代码中是我唯一的选择吗?

Has anyone succeeded using Amazon Cognito from Ionic2 app? 有没有人从Ionic2应用程序成功使用过Amazon Cognito?

You need to add typescript definitions of the AWS-SDK in your ionic2 and/or angular2 app. 您需要在ionic2和/或angular2应用程序中添加AWS-SDK的打字稿定义。 This will allow you to use all build-in functionalities provided in the AWS-SDK including Cognito. 这将允许您使用AWS-SDK中提供的所有内置功能,包括Cognito。 Look at here to get started. 这里开始。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM