Cordova plugins not working with ionic

Ben Taliadoros

I have an Ionic app built with Angular.

I am using is Calendar plugin: https://github.com/EddyVerbruggen/Calendar-PhoneGap-Plugin

I want to create events through the plugin and save them to the local device's calendar.

I have added the plugin though:

cordova plugin add https://github.com/EddyVerbruggen/Calendar-PhoneGap-Plugin.git

And I try to use it in my controller:

 ionic.Platform.ready(function(){onError);
    window.plugins.calendar.createEvent(title, location, notes, start, end, onSuccess, onError);
 });

In the browser it says window.plugins is undefined and on the device the error is 'undefined' is not an object (evaluating 'window.plugins.calendar')

I have searched high and low for this, I cant seem to find a solution that works.

Any idea how to use a Cordova plugin with Ionic?

Ben Taliadoros

The answer was to add

<script src="cordova.js"></script>

And rebuild the Platforms

If still issue not resolved, remove and add the platforms

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Cordova plugins not work with Ionic

From Dev

Cordova plugins not working

From Dev

No plugins are working in Cordova

From Dev

Cordova plugins undefined with IONIC framework

From Dev

Using plugins with cordova/ionic framework

From Dev

Ionic cordova plugins by android version

From Dev

ionic cordova plugins and ionic.Platform.ready

From Dev

ionic cordova plugins and ionic.Platform.ready

From Dev

Ionic Cordova camera is not working

From Dev

Ionic Cordova Camera not working

From Dev

Cordova plugins in Ionic 1 app using Typescript

From Dev

Best practices for Cordova/Ionic Plugins management?

From Dev

Using Cordova Plugins in Ionic Inside a Controller

From Dev

Ionic & Visual Studio/Cordova - Ionic not working

From Dev

Cordova Plugins not working after Xcode and Cordova update (OSX)

From Dev

Plugins not installing during platform add with ionic/cordova on ios

From Dev

Access Cordova plugins directly from ionic2 typescript components

From Dev

Working with non ionic-native plugins in Ionic 2

From Dev

Ionic + Cordova InappBrowser - Input type=file not working

From Dev

Cordova & Ionic on ios - Device plugin not working

From Dev

Ionic2 Cordova Camera Not Working

From Dev

Cordova plugins stop working when loading another html file

From Dev

Unzip files on Cordova 4.0 - APP Builder Telerik plataform - Plugins not working

From Dev

how can we know if the plugins are properly loaded in ionic (one-signal-cordova-plugin)

From Dev

Cordova Ionic email plugin not working on iOS 9 due to URL

From Dev

login with twitter in ionic cordova not working using $cordovaOauth.twitter

From Dev

Ionic cordova bluetooth plugin is not working with - - prod flag build

From Dev

Cordova plugins undefined

From Dev

Firebase Native Cordova Plugins

Related Related

  1. 1

    Cordova plugins not work with Ionic

  2. 2

    Cordova plugins not working

  3. 3

    No plugins are working in Cordova

  4. 4

    Cordova plugins undefined with IONIC framework

  5. 5

    Using plugins with cordova/ionic framework

  6. 6

    Ionic cordova plugins by android version

  7. 7

    ionic cordova plugins and ionic.Platform.ready

  8. 8

    ionic cordova plugins and ionic.Platform.ready

  9. 9

    Ionic Cordova camera is not working

  10. 10

    Ionic Cordova Camera not working

  11. 11

    Cordova plugins in Ionic 1 app using Typescript

  12. 12

    Best practices for Cordova/Ionic Plugins management?

  13. 13

    Using Cordova Plugins in Ionic Inside a Controller

  14. 14

    Ionic & Visual Studio/Cordova - Ionic not working

  15. 15

    Cordova Plugins not working after Xcode and Cordova update (OSX)

  16. 16

    Plugins not installing during platform add with ionic/cordova on ios

  17. 17

    Access Cordova plugins directly from ionic2 typescript components

  18. 18

    Working with non ionic-native plugins in Ionic 2

  19. 19

    Ionic + Cordova InappBrowser - Input type=file not working

  20. 20

    Cordova & Ionic on ios - Device plugin not working

  21. 21

    Ionic2 Cordova Camera Not Working

  22. 22

    Cordova plugins stop working when loading another html file

  23. 23

    Unzip files on Cordova 4.0 - APP Builder Telerik plataform - Plugins not working

  24. 24

    how can we know if the plugins are properly loaded in ionic (one-signal-cordova-plugin)

  25. 25

    Cordova Ionic email plugin not working on iOS 9 due to URL

  26. 26

    login with twitter in ionic cordova not working using $cordovaOauth.twitter

  27. 27

    Ionic cordova bluetooth plugin is not working with - - prod flag build

  28. 28

    Cordova plugins undefined

  29. 29

    Firebase Native Cordova Plugins

HotTag

Archive