i am trying to get current page instance in app.component in ionic 4.
in ionic 3 i can do it like this
this.nav.getActive().instance
You can access the url from the Router.
import { OnInit } from '@angular/core';
import { Router } from '@angular/router';
export class YourPage implements OnInit {
constructor(private router: Router) {}
ngOnInit() {
console.log('this.router.url', this.router.url);
}
}