I am looking to add an optional url segment in the following example:
url: "/post/:category/:subcategory/:title/{id:int}",
In this scenario, subcategory is not required. It should be able to accept:
url: "/post/sports/football/some-title/10",
as well as:
url: "/post/sports/some-title/15",
without a subcategory. I know I can achieve this using separate states, but is there a specific rule for making only the subcategory segment optional while keeping others mandatory?