0

i am using ionic 2 for my android application. For page routing i am using

this.nav.push(LoginPage);

When i push from one page to another it's showing previous page some sections in current page. Because of this my pages are not showing as expected.

 Cordova CLI: 6.5.0
Ionic Framework Version: 3.6.0
Ionic CLI Version: 2.2.1
Ionic App Lib Version: 2.2.0
Ionic App Scripts Version: 2.0.2
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 10
Node Version: v6.10.0
Xcode version: Not installed

Please help. I cant find any errors in my console. I don't know why its happening. Please suggest need to follow any particular standard for routing.

Thanks

Sarath
  • 1,459
  • 3
  • 22
  • 38

1 Answers1

1

Add loginPage import to app.module.ts file.

import { NavController} from 'ionic-angular';

Add in constructor like constructor(private navCtrl: NavController)

And push the page on stack

this.navCtrl.push(LoginPage);
Dr. X
  • 2,890
  • 2
  • 15
  • 37
Manish
  • 13,047
  • 1
  • 12
  • 9
  • the same way i am doing in my application. But previous page styles are also showing – Sarath Sep 25 '17 at 08:15
  • For style, Are you, using common app.sass (This page style applied throughout the application)?. For separate style, we have to write style code on login.scss file or (.scss file related to that component) – Manish Sep 25 '17 at 09:12