meteor this.params._id is undefined stick -
i'm student learning meteor.js
.
iron:router
using:
this.route('postedit', { path: '/posts/:_id/edit', data: function() { console.log(this.params._id); return posts.findone(this.params._id); } });
and error displayed:
this.params._id value undefined76kndyuwd2kdx2eee...
why undefined
has stick value?
postedit
call has:
<a href="{{pathfor 'postedit'}}">edit</a>
originally, 76kndyuwd2kdx2eee due url being localhost:3000/posts/undefined76kndyuwd2kdx2eee/edit
...
please, me. thank you.
please update iron@1.0.9
, should fix it.
Comments
Post a Comment