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:
- <form [formGroup]="submitForm" (ngSubmit)="checkOut(items)">
- <input type="submit" value="Check Out">
- </form>
This is the component:
- public checkOut(items: any) {
- this.router.navigate(['check-out'], { queryParams: { items: this.items } });
- }
This is what the URL looks like:
http://localhost:4200/check-out?items=%5Bobject%20Object%5D&items=%5Bobject%20Object%5D