Angular ui.router, Creating an Optional First Path Param
问题 Relatively new to working with Angular, but I couldn't seem to find any url aliasing or fully optional path params (something like {/var1}/:var2 when using ui.router's $stateProvider . I'm looking to have the following both be valid paths, ideally on the same state declaration so that I can call state changes using one or both params. /var1/var2 /var2 Naturally, I can use matches like the following, but none of these are true solutions. /:var1/:var2 , but this still requires an empty value