This is my code. Is there any other better or best way to get the queryParams from the url?
  getSolutionId(){
    let solutionId: number;
    this.activatedRoute.queryParams.subscribe((queryParams) => {
      solutionId = queryParams.solutionId ? queryParams.solutionId: null;
    });
    return solutionId;
  }
 
     
     
    