NativePageTransitinons ¿bug? Cannot import from Ionic-native

Hello team

I am trying to use the NativePageTransition (http://ionicframework.com/docs/v2/native/nativepagetransitions/) from ‘ionic-native’.

I make this steps:

  1. ionic plugin add com.telerik.plugins.nativepagetransitions
  2. In app.ts, after platform ready:
    import {NativePageTransitions, TransitionOptions} from ‘ionic-native’;
    But wstorm cannot resolve symbol ‘NativePageTransitions’ && ‘TransitionOptions’

Trying with wstorm auto-import results: import { TrasitionOptions} from ‘ionic-angular’;
I can see the interface:
export interface TransitionOptions {
animation: string;
duration: number;
easing: string;
direction: string;
renderDelay?: number;
isRTL?: boolean;
ev?: any;
}

Cannot import “NativePageTransitions” from anywhere.

Sorry for my english, and… Why this happening ??

EDIT: Where are my manners ?
ionic info:
Cordova CLI: 6.3.1
Ionic Framework Version: 2.0.0-beta.11
Ionic CLI Version: 2.0.0-beta.36
Ionic App Lib Version: 2.0.0-beta.19
OS: Distributor ID: Debian Description: Debian GNU/Linux 8.5 (jessie)
Node Version: v4.5.0
NPM -v: 2.15.9

Running on debian jessie (8.5) using webstorm 2016 & google chrome 53.0.2785.89 (64bits)

What version of ionic native do you have installed?

1 Like

“ionic-native”: “1.3.10”

“dependencies”: {
"@angular/common": “2.0.0-rc.4”,
"@angular/compiler": “2.0.0-rc.4”,
"@angular/core": “2.0.0-rc.4”,
"@angular/forms": “0.2.0”,
"@angular/http": “2.0.0-rc.4”,
"@angular/platform-browser": “2.0.0-rc.4”,
"@angular/platform-browser-dynamic": “2.0.0-rc.4”,
“es6-shim”: “^0.35.0”,
“ionic-angular”: “2.0.0-beta.11”,
“ionic-native”: “1.3.10”,
“ionicons”: “3.0.0”,
“ng2-translate”: “2.2.2”,
“reflect-metadata”: “^0.1.3”,
“rxjs”: “5.0.0-beta.6”,
“zone.js”: “^0.6.12”
},

Oki dokey, native page transitions was added to ionic-native in version 1.3.19.

So update the ionic-native line in your package.json to point to the latest version “1.3.21” and then run ```npm install` and you should be good to go!

1 Like

Love u so much !! I’m breaking my brain with this.

npm list ionic-native & npm info ionic-native versions return two different versions.

Solution:
I use “npm update ionic-native” before see your post ( Don’t know if do anything )
Changed package.json with the latest version
"ionic-native": “^1.3.21”,

“npm install”

And it works. I can see the animation but i don’t understand how it works. Need to use the NavController too? like:
NativePageTransitions.slide(options)
.then((res)=> {
this.navCtrl.setRoot ( SearchPage, { inputValue: this.inputAmount });
})
.catch(()=> {});

I am also having same problem, not sure how to use this :frowning: . Would be awesome to see a sample code on how to use it.