Angular: append query parameters to URL

前端 未结 6 1165
萌比男神i
萌比男神i 2020-12-28 14:43

Im using this:

    import { HttpParams } from \'@angular/common/http\';
    let params = new HttpParams();
    params.a         


        
6条回答
  •  清歌不尽
    2020-12-28 15:03

    I had to adjust Jota.Toledos answer a bit so that it works for me, I had to take out the second and the last property of the extras - object:

       navigateToFoo(){
         this._router.navigate([], {
          queryParams: {
            newOrdNum: '123'
          },
          queryParamsHandling: 'merge',
        });
       }
    

提交回复
热议问题