How to use a plugin without using ionic-native?

后端 未结 1 686
北海茫月
北海茫月 2020-12-18 16:32

I want add the cordova plugin: cordova-plguin-ms-adal. Because this plugin is not supported in the ionic-native. I don\'t know how to implement myself, so I open an issue an

相关标签:
1条回答
  • 2020-12-18 17:30

    You can use cordova plugin in ionic2 though the plugin is not supported by ionic-native. Add the required plugin to your project.

    Open the file "Plugins.xml" and check for the target value under clobbers tag. In your case, it is Microsoft.ADAL.AuthenticationContext where Microsoft is the base class.

    Open the ts file where you want to use the plugin.Use declare var Microsoft: any;under import as it is a base class. Then call the method as Microsoft.ADAL.AuthenticationContext.your_method()

    0 讨论(0)
提交回复
热议问题