These are the steps I am executing:
# meteor create helloworld
# cd helloworld
# meteor
Terminal displays Running on: http://localhost:3000/
I point the browser to http://localhost:3000/
Everything looks ok in the browser, I see Hello World!. I click on the [Click] button. Nothing happens, no alert in browser. I switch to the terminal anticipating to see You pressed the button but all I see is Running on: http://localhost:3000/ I don’t see You pressed the button anywhere in client or server.
So in helloworld.js, what is the following code snippet supposed to do?
Template.hello.events = {
'click input' : function () {
// template data, if any, is available in 'this'
if (typeof console !== 'undefined')
console.log("You pressed the button");
}
};
}
My best guess is in the terminal below the line Running on: http://localhost:3000/ You pressed this button will appear everytime I click on the button but nothing happens.
Check the console in your browser. If you’re using Chrome access the console using Tools -> Javascript Console. You’ll see tabs like Elements, Resources… Go to the last one ‘Console’. You could also use Ctrl+Shift+J to access the Javascript console.