FlowRouter.path(path, params, qs);
path
{String} - Path or Route's nameparams
{Object} - Serialized route parameters,{ _id: 'str' }
qs
{Object} - Serialized query string,{ key: 'val' }
- Returns {String} - URI
const pathDef = '/blog/:cat/:id';
const params = { cat: 'met eor', id: 'abc' };
const queryParams = {show: 'y+e=s', color: 'black'};
const path = FlowRouter.path(pathDef, params, queryParams);
console.log(path); // --> "/blog/met%20eor/abc?show=y%2Be%3Ds&color=black"
If there are no params
or qs
, it will simply return the path as it is.