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: '/{source:(?:John|Paul)}/:id'
But i need to match my url with an list of words.
example:
var sourceList= ['John', 'Paul', 'George', 'Ringo'];
url: '/{source:(?:sourceList)}/:id'
is there way to compare my url with matching list of array??
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…