Answers for "ionic 4 get state name"

1

ionic 4 get state name

private tab: string;

constructor(
  private navCtrl: NavController,
  private router: Router
) {
  const url = this.router.url;
  const urlParts = url.split('/');

  this.tab = 'home';
  if (urlParts.includes('map')) {
    this.tab = 'map';
  }
}
Posted by: Guest on July-22-2021

Browse Popular Code Answers by Language