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';
}
}