Helpers ng-repeat VS {{#each ...}}


#1

Hi there

I’m still struggling with joins using Angular and Meteor. I found this https://atmospherejs.com/reywood/publish-composite but I don’t know if this will work as expected using Angular. But I found an interesting example using helpers.

Template.topTenPosts.helpers({
posts: function() {
    return Posts.find();
},

postAuthor: function() {
    // We use this helper inside the {{#each posts}} loop, so the context
    // will be a post object. Thus, we can use this.authorId.
    return Meteor.users.findOne(this.authorId);
}
})

And I was like: Oh, I can use the context (this.authorId). That would actually solve my problem. But then I tried with angular and using ng-repeat instead of {{#each posts}}. My this is actually the component instance. Is this supposed to work with Angular?