Closed paOol closed 8 years ago
the file shows this in the comments.
* * @param {string|RegExp|Array<string, RegExp>} commands
however, I'm not sure what the regex should look like in routes.
I've tried
get routes() { return { ['/gif ', '/\/gif (.+)/i']: 'returnGif' } }
and
get routes() { return { '/\/gif (.+)/i': 'returnGif' } }
I am trying to do "/gif :searchterm" but that breaks if the query is more than one word.
solved
get routes() { return { [/\/gif (.+)/i]: 'returnGif' } } tg.router .when([/\/gif (.+)/i], new MediaController())
the file shows this in the comments.
however, I'm not sure what the regex should look like in routes.
I've tried
and
I am trying to do "/gif :searchterm" but that breaks if the query is more than one word.