meteor - Iron Router - Get Route URL as Variable/String -
in iron router, can url of route , redirect doing...
router.go('route_name', { param: parm })
this returns url (i.e. /whatever/whatever) , redirects url.
how can url , not redirect?
you can access route object directly , ask path:
router.routes['route_name'].options.path
or
router.routes['route_name'].path()
or, if want absolute url:
router.routes['route_name'].url()
Comments
Post a Comment