Helpers in weather

0

Hi, I'm quite new in meteor and recently I started mixing it with angular2. I have tried in all possible ways to do something that is quite similar to populate in mongoose to obtain the complete objects of relationships. For this I used the meteor packages stfnbrgh:nested-collection-helpers and dburles:collection-helpers but when I created the collection as follows

import {MongoObservable} from "meteor-rxjs";
export const Tasks=new MongoObservable.Collection('tasks');

When I try to do

Tasks.helpers({
  author(){
    Meteor.users.findOne(this.trabajador);
}
})

He tells me

  

unresolved function or method helpers

Someone can help me

    
asked by Gabo Hurtado Turiño 16.08.2017 в 20:47
source

1 answer

0

The meteor helpers should return something try this way

return Meteor.users.findOne(this.trabajador);

Please note that if you are referencing this.worker is this defined or send it as a parameter to the helper

    
answered by 03.11.2017 в 23:09