简体   繁体   English

如何将 Cordova 插件 (IndoorAtlasSDK) 导入 Ionic

[英]How to import Cordova Plugin (IndoorAtlasSDK) into Ionic

I'm trying to import and use the Cordova Plugin IndoorAtlas SDK into an Ionic Project.我正在尝试将 Cordova 插件 IndoorAtlas SDK 导入并使用到 Ionic 项目中。 I tried different Tutorials/AnswerForums from all over the Inte.net but none of them worked.我尝试了来自整个 Inte.net 的不同教程/AnswerForums,但没有一个有效。 So that's why I'm asking here.所以这就是我在这里问的原因。 The Ionic Project is using Angular. Ionic 项目正在使用 Angular。

I have already set up an Ionic Cordova Angular Project and imported the IndoorAtlas plugin using the following code:我已经设置了一个 Ionic Cordova Angular 项目并使用以下代码导入了 IndoorAtlas 插件:

cordova plugin add "path"

Is this correct this way?这样正确吗? I also read somewhere that I have to create a wrapper to use the plugin?我还在某处读到我必须创建一个包装器才能使用该插件? How can I start using the plugin in my Project?如何开始在我的项目中使用该插件?

Thanks in advance!提前致谢!

文件夹结构插件

You can use Ionic Native to get a nicer Typescript API if the plugin is implemented.如果实现了插件,您可以使用Ionic Native获得更好的 Typescript API。 But as you said this is just a wrapper library.但正如你所说,这只是一个包装库。 You can always use the JavaScript functions from the plugin in your Ionic app.您始终可以在 Ionic 应用程序中使用插件中的 JavaScript 函数。

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

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