Maureen Moore

Maureen Moore

  • NA
  • 206
  • 0

Query Parameter Not Showing the Correct Parameters

Sep 27 2020 9:44 AM
When I add items to the query parameters, it shows an object in the URL. How can I get it to show the items?
This is the HTML:
  1. <form [formGroup]="submitForm" (ngSubmit)="checkOut(items)">  
  2. <input type="submit" value="Check Out">  
  3. </form>  
This is the component:
  1. public checkOut(items: any) {  
  2. this.router.navigate(['check-out'], { queryParams: { items: this.items } });  
  3. }  
This is what the URL looks like:
http://localhost:4200/check-out?items=%5Bobject%20Object%5D&items=%5Bobject%20Object%5D

Answers (1)