I want to generate the html code for a specific iron router link within a template helper.
I’ve tried various options:
var link = Router.routes['find_contact_persons_page'].url({_companyId: this._id});
This returns null.
var link = Router.routes['find_contact_persons_page'].handler.path;
This returns:
/find_contact_persons_page/:companyId
Which is correct but how do I then in a smart way generate the full link with the correct parameter inserted?
It cannot be true that I have to do string replace, etc. to create it.
I have been unable to find any docs on how to do this.