vue-meteor-tracker icon indicating copy to clipboard operation
vue-meteor-tracker copied to clipboard

dynamic $subscribe name?

Open thearabbit opened this issue 7 years ago • 2 comments

       props: ['subscribeName'],
        meteor: {
            $subscribe: {
                [this.subscribeName](){
                    return ........;
                }
            },
            tableData(){
                console.log(Posts.find({}).fetch());
            },
        },

thearabbit avatar Jun 13 '17 05:06 thearabbit

This would be great

WayneUong avatar Nov 07 '18 22:11 WayneUong

Looks like you could use the 5his.$subscribe api. Example from the readme:

mounted () {
  // Subscribes to the 'threads' publication with two parameters
  this.$subscribe('thread', ['new', 10])
}

TechplexEngineer avatar Aug 29 '19 11:08 TechplexEngineer