I made an example on Meteor.setTimeout() using Meteor . In this example, I am getting an error. I had no idea about this. So see below code, error and suggest me how to do this?
Mistake:
Exception in setTimeout callback: TypeError: undefined is not a function at _.extend.withValue (http://localhost:3000/packages/meteor.js?8ec262df25783897eaad01255bc8bd1ca4e78b24:773:17) at http://localhost:3000/packages/meteor.js?8ec262df25783897eaad01255bc8bd1ca4e78b24:358:45 at http://localhost:3000/packages/meteor.js?8ec262df25783897eaad01255bc8bd1ca4e78b24:801:22
JS Code:
if (Meteor.isClient) { Meteor.setTimeout(Test("10"), 1000); Meteor.setInterval(Test1, 1000); Template.hello.greeting = function () { return "Welcome to timerapp."; }; Template.hello.events ({ 'click input' : function () { // template data, if any, is available in 'this' if (typeof console !== 'undefined') console.log("You pressed the button"); //Test(); } }); } function Test(x) { console.log("*** Test() ***"+x); } function Test1() { console.log("*** Test1() ***"); } if (Meteor.isServer) { Meteor.startup(function () { // code to run on server at startup }); }
javascript meteor
user3213821
source share