I use an iron router for my meteor project, and everything is going well, but I just ran into some weird behavior.
I have a loop configured for a list of elements that looks something like this.
{{#each list_items}}
<div>{{user.username}}
<a href="{{link}}">Click here!</a>
</div>
{{/each}}
The JSON object for my user looks something like this:
{
user: {
username: jdoe
},
images: {
low-res-url: http://example.com
},
link: http://example.com/profile
}
Now {{user.username}} displays as expected, but when I try to put {{link}} in href, I get an error from iron-router saying
"You called Router.path for a route named undefined but that that route doesn't seem to exist. Are you sure you created it?"
Any help or advice would be appreciated.
source
share