4 ms·
Here is how I would do it: Assuming you were searching for computers with the following filters: Manufacturer: Apple Type: Laptop You could represent
by NathanKP 13y ago
Here is how I would do it:
Assuming you were searching for computers with the following filters:
Manufacturer: Apple
Type: Laptop
You could represent that as:
http://mystore.com/electronics/computers/manufacturer/apple/type/laptop
If you make your routing code (on either the frontend or the backend) robust enough then you will be able to support any number of filters in any order.
- matryer 13y agofor nested data - I 100% agree. I'd do that and use params for things like ordering or filtering on other fields: http://mystore.com/electronics/computers/manufacturer/apple/type/laptop#?order=-price&size=medium Also - the `#` is nice for when you don't want to reload the page.