Closed kenshinman closed 8 years ago
When are you executing that command? Perhaps the page is nog completely loaded?
Perhaps you could give this a try:
Router.current().route.path()
This may be because window.location is not reactive. I suggest using Iron.Location.get() instead, which is a reactive alternative that comes with iron-router.
Hi, I'm using iron router in my project. So when I go from the homepage to another template/ page I tried getting the href of the current with console.log(window.location.href), I get the URL of the previous page until I refresh the current page before I get it's URL. How can this be resolved?