Access Cordova plugins directly from ionic2 typesc

2019-07-21 11:59发布

I am creating new Ionic2 typescript application. Few of the required native access plugins are not available in ionic native till now(Routed device check plugin, Read SMS plugins etc). So i required to use cordova plugins directly with out intervention of ionic native class and injection formalities. your suggestions are appreciable. thanks

1条回答
啃猪蹄的小仙女
2楼-- · 2019-07-21 12:54

There is absolutely nothing to stop you from using these plugins. Just tell typescript that they exist like so:

declare var rootdetection:any; 

If you want to be proficient about it, writing your typing(an interface with all the plugins functionality) for the plugin and add it to your project

查看更多
登录 后发表回答