@flotilla wrote:
Hey, i have some problem with Native Page Transitions.
here is my code.
home.page.html
<ion-footer> <ion-tabs> <ion-tab-bar slot="bottom" > <ion-tab-button (click)="slidePage()" href="/profil" style="margin-bottom:5px" > <ion-icon end style="color: white; font-size: 35px !important" name="md-person"></ion-icon> </ion-tab-button> <ion-tab-button> </ion-tab-button> <ion-tab-button href="/options" style="margin-bottom:5px"> <ion-icon style="color: white; font-size: 35px; " name="ios-more"></ion-icon> </ion-tab-button> </ion-tab-bar> </ion-tabs> <div class="knfooter"> <a href="/giris"> <img src="../assets/images/scanning5.png" style="height: 86px; " ></a> </div> </ion-footer>
app.module.ts
import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { RouteReuseStrategy } from '@angular/router'; import { IonicModule, IonicRouteStrategy } from '@ionic/angular'; import { SplashScreen } from '@ionic-native/splash-screen/ngx'; import { StatusBar } from '@ionic-native/status-bar/ngx'; import { AppComponent } from './app.component'; import { AppRoutingModule } from './app-routing.module'; import { NativePageTransitions } from '@ionic-native/native-page-transitions/ngx'; //import { GirisPage } from './giris/giris.page'; @NgModule({ declarations: [ AppComponent, //GirisPage, ], entryComponents: [ ], imports: [ BrowserModule, IonicModule.forRoot(), AppRoutingModule, ], providers: [ StatusBar, SplashScreen, { provide: RouteReuseStrategy, useClass: IonicRouteStrategy }, NativePageTransitions, ], bootstrap: [AppComponent,] }) export class AppModule {}
and
home.page.ts
import { Component } from '@angular/core'; import { Router } from '@angular/router'; import { NativePageTransitions, NativeTransitionOptions } from '@ionic-native/native-page-transitions/ngx'; @Component({ selector: 'app-home', templateUrl: 'home.page.html', styleUrls: ['home.page.scss'], }) export class HomePage { constructor(private router: Router, private nativePageTransitions: NativePageTransitions ) {} slidePage(){ let options: NativeTransitionOptions = { direction: 'left', duration: 400, slowdownfactor: -1, iosdelay:50 } this.nativePageTransitions.slide(options); this.router.navigateByUrl("/profil"); } }
no error but not working.
Posts: 1
Participants: 1