简体   繁体   中英

Access Cordova plugins directly from ionic2 typescript components

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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