Using AngularJS + ui-router, I need to match a url with list of words:
However, using a regex I have tried using one or 2 words and it worked
url: \
Previous answers are ok, but I most of the time need something simpler solution like this:
url: '/something/{source:(?:' + ['John', 'Paul'].join('|') + ')}/:id',
without need for using $urlMatcherFactory