Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ionic 4 how to import in use plugin #4

Open
Jayprakashsingh opened this issue Jun 19, 2019 · 3 comments
Open

ionic 4 how to import in use plugin #4

Jayprakashsingh opened this issue Jun 19, 2019 · 3 comments

Comments

@Jayprakashsingh
Copy link

ionic 4 . install this plugin using npm i cordova-plugin-exit. plugin install successfully when i try this plugin as below
cordova.plugins.exit();
this throw following error

Property 'exit' does not exist on type 'CordovaPlugins'

do i need to import or any thing else to solve this error

@cakuki
Copy link
Owner

cakuki commented Jun 19, 2019

I have not tested with Ionic. I guess there might be a new cordova interface for plugins, CordovaPlugins was not a type I am familiar with. I will try to check this with Cordova 9 and Ionic 4.

@lakano
Copy link

lakano commented Oct 1, 2019

Do you have any idea of how this could works under Ionic v4 please?

@mcastets
Copy link

Do you have any idea of how this could works under Ionic v4 please?

if (window.cordova && window.cordova.plugins) {
     (window.cordova.plugins as any).exit();
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants