Which of the following is correct to get the counter from the Template helpers ? import { ReactiveVar } from 'meteor/reactive-var' Template.MainLayout.onCreated(function(){ this.counter = new ReactiveVar(0); }) Template.MainLayout.helpers({ getCounter: function(){ // Get counter here } })
Meteor - JavaScript Web Framework MCQs
Which of the following is correct to get the counter from the Template helpers ? import { ReactiveVar } from 'meteor/reactive-var' Template.MainLayout.onCreated(function(){ this.counter = new ReactiveVar(0); }) Template.MainLayout.helpers({ getCounter: function(){ // Get counter here } })