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

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - Bypass Geo Redirect for specific directories -

php - .htaccess mod_rewrite for dynamic url which has domain names -