javascript - what does the error “Exception in template helper: Error: Handler with name 'pathFinder' already exists.” mean? -
my code is
template.homeitem.helpers({ 'sharedata': function() { return { title: this.title, author:meteor.users.findone(this.createdby),//createdby stores author's userid url: router.map(function(){ router.route('/content/:_id',{ name:'pathfinder', template:'pathfinder', data: function(){ var currentroute= this.params._id; return contentslist.findone({_id: currentroute}); }});})}}
i not know correct way pass url in sharedata of shareit.
thanking everyone
first of all, please indent code. it's unreadable , contains error due poor indentation.
to question; means have created route name.
it's hard tell you're trying achieve think trying to this:
template.homeitem.helpers({ 'sharedata': function() { return { title: this.title, author: meteor.users.findone(this.createdby), url: '/content/' + this._id } } })
Comments
Post a Comment