'angular url control in ListController

I am sending parameter from HomeComponent to ListComponent
HomeComponent:

 goToListComponent(value: string) {
    const url = this.router.serializeUrl(this.router.createUrlTree(['/list'], {
      queryParams: {
        value: value,
      }
    }));
    window.open(url, '_blank');
  }
ListComponent:


ngOnInit() {
    this.route.queryParams
      .subscribe(params => {
        this.value = params['value'];

      });
}

A lot of data is coming from ListController to ListComponent and I want to list data from ListController as "top 5", "top 10" according to incoming parameter. I tried with For loop according to the parameter in ListComponent and got result after 5-10 minutes. When I am redirected to the list page in ListController, I can't think of any other method other than the url control, I don't know if it's possible.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source