I'm trying to get queryparams from URL in service
.
I am taking params using this
URL: http://localhost:4200/?param1=15¶m2=abcdef
this._activeRoute.queryParams.subscribe((params: Params) => {
this.p1 = params['param1'];
this.p2 = params['param2'];
});
so, now I got params in this.p1
and this.p2
I want to clear the queryparams from URL like,
http://localhost:4200/
Please suggest me a way here