Search code examples
cordovanpmionic-frameworkphonegap-plugins

How do I add plugins to my Ionic project?


I'm trying to add ionic-native-transitions to my app by following the instructions outlined on the page. The steps they online:

Bower

bower install shprink/ionic-native-transitions

Ionic CLI

Ionic plugin add https://github.com/Telerik-Verified-Plugins/NativePageTransitions#0.5.4`

Configuration

angular.module('yourApp', [
    'ionic-native-transitions'
]);

And this is where everything breaks and I get the following error:

Uncaught Error: [$injector:modulerr] Failed to instantiate module yourApp due to: Error: [$injector:modulerr] Failed to instantiate module ionic-native-transitions due to: Error: [$injector:nomod] Module 'ionic-native-transitions' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.

Am I missing something somewhere? Even if it's something very obvious e.g. having to add something to my index.html?


Solution

  • I have used this plugin in one of my project and worked perfectly,

    Add ionic-native-transitions plugin using command,

    cordova plugin add https://github.com/Telerik-Verified-Plugins/NativePageTransitions
    

    This plugin contains many animation styles(up,flip,slide,fade,drawer etc) for changing view transitions.

    Please Refer this tutorial

    If you have any doubt.Please let me know?Thanks