angular get last url without parameters code example Example: in angular how to get router url without query params this.router.url.split('?')[0]