I am facing a challenge where most parts of the URLs are optional, with the controller remaining the same. The URL structure is dynamic and changes based on the selected filter parameters. For example, it could be /search
, /search/min-1000
, /search/max-10000
, and so on.
In addition, there are details URLs that are similar to the search URLs but include an id
part. For instance, /search/{id}/min-1000
, /search/{id}/min-1000/max-10000
,
/search/{manufacture-name}/{id}/min-1000/max-10000
, and more.
I'm looking for a way to construct such dynamic URLs using angular-router or angular-ui.
For an example, you can check out this link: http://plnkr.co/edit/70Ihz0nqRjiDOKoEJzRI