Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get path to a template in iron router

How can I get the path to a template in new version of iron-router for Meteor 1.0?

Before I could do this to get the current relative path:

Router.current().path

Now, as of meteor 1.0 it seems the path attribute has been removed.

How can I get the relative path to a template in iron-router?

like image 319
while Avatar asked Dec 11 '22 02:12

while


1 Answers

Router.current().path

This has been moved to Router.current().location.get().path

See the iron:location package for more info on the location object.

https://github.com/EventedMind/iron-location

(this is added automatically by iron:router).

like image 175
saimeunt Avatar answered Jan 11 '23 23:01

saimeunt