I've searched for a solution in other questions, but nothing has helped me...
My goal is to redirect to a URL like this:
this.router.navigateByUrl('/products');
I want to pass an array and retrieve it in the component with the active link products
using skip location change without displaying anything in the URL.
The array will look like this:
products = [{"id":1,"name":"Product One"},{"id":2,"name":"Product Three"},{"id":3,"name":"Product Six"}]
I need to pass this entire array in the router link and retrieve it in another component (products) with skipLocationChange set to true...
I tried using sharedService
, but I encountered issues with data loading at the right time, which led me to decide to use a router link instead...
If you believe this approach isn't ideal, please suggest an alternative method that doesn't involve shared service...