Native Page Transitions not working with ionic 4

I use Native Page Transitions from here https://ionicframework.com/docs/native/native-page-transitions
but It not working I got some error

index.js:182 Uncaught TypeError: Object(...) is not a function
   at index.js:182
   at Module../node_modules/@ionic-native/native-page-transitions/index.js (index.js:278)
   at __webpack_require__ (bootstrap:83)
   at Module../src/app/setting/setting.page.ts (main.js:1899)
   at __webpack_require__ (bootstrap:83)
   at Module../src/app/app.module.ts (app.component.ts:11)
   at __webpack_require__ (bootstrap:83)
   at Module../src/main.ts (main.ts:1)
   at __webpack_require__ (bootstrap:83)
   at Object.0 (main.ts:12)

Here is my code

import { Component, OnInit } from '@angular/core';
import { ModalController, NavParams} from '@ionic/angular';
import { NativePageTransitions, NativeTransitionOptions } from '@ionic-native/native-page-transitions';

@Component({
  selector: 'app-setting',
  templateUrl: './setting.page.html',
  styleUrls: ['./setting.page.scss'],
})
export class SettingPage implements OnInit {

  constructor(
    private modalCtrl: ModalController, 
    private navParams: NavParams,
    private nativePageTransitions: NativePageTransitions
    ){ 
  }

  dismiss() {
    this.modalCtrl.dismiss();
  }

  ionViewWillLeave() {
    console.log("ionViewWillLeave");
    let options: NativeTransitionOptions = {
    direction: 'up',
    duration: 500,
    slowdownfactor: 3,
    slidePixels: 20,
    iosdelay: 100,
    androiddelay: 150,
    fixedPixelsTop: 0,
    fixedPixelsBottom: 60
   };

   this.nativePageTransitions.slide(options)
     .then(onSuccess)
     .catch(onError);
  }

  onSuccess(){
    console.log("ionViewWillLeave onSuccess");
  }
  onError(){
    console.log("ionViewWillLeave onError");
  }


  ngOnInit() {
  }

}

what was wrong? who can help me?please!

2 Likes

login(){
let options: NativeTransitionOptions = {
direction: ‘rigth’,
duration: 500,
slowdownfactor: -1,
iosdelay: 300,

 }

this.nativePageTransitions.curl(options);
this.nav.navigateForward('home');

}

deixe algo assim,

got the same issue, ionic 4 last beta

Hello, I am using ionic 4. and have same issue for @ionic-native/native-page-transitions its not working. please help me to solve if anyone can solve that.