Ionic URL not updating


#1

In my app.component.ts I set rootPage to LoginComponent like this:

import { Component } from '@angular/core';
import { Platform, IonicPage } from 'ionic-angular';
import { StatusBar } from '@ionic-native/status-bar';
import { SplashScreen } from '@ionic-native/splash-screen';
import { Deeplinks} from '@ionic-native/deeplinks';


@Component({
templateUrl: 'app.html'
})
export class MyApp {
rootPage:any = 'login';

constructor(platform: Platform, statusBar: StatusBar, splashScreen: 
             SplashScreen, private deeplinks: Deeplinks) {
    platform.ready().then(() => {
      statusBar.styleDefault();
      splashScreen.hide();

   });
  }
}

Then in my LoginComponent I use

this.navCtrl.setRoot('friend-list');

friend-list is component which is decorated by

@IonicPage({
 name: 'friend-list',
 segment: 'friend-list'
})

Problem is that I always in my browser I have static localhost like localhost:8100/#/login, whenever I am in my app, but if I enter localhost:8100/#/friend-list app goes properly to the component. What could cause this problem?


#2

In my friend-list.component when I go to other component, and there I use this.navCtrl.popTo('friend-list'); My url is changing. What is wrong, when I go to friend-list from Login and there I use setRoot method to change Root Page?


#3

did you figure this out? i am having a similiar issue