Reputation: 3772
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?
Upvotes: 4
Views: 2802
Reputation: 22696
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
).
Upvotes: 9
Reputation: 1757
Maybe this will be helpful for you: Router.current().originalUrl
or Router.current().url
Upvotes: 4