这些都是我在正在执行步骤:流星创建的HelloWorld
# meteor create helloworld
# cd helloworld
# meteor
终端显示Running on: http://localhost:3000/
我将浏览器指向http://localhost:3000/
一切都在浏览器看起来不错,我看到的Hello World !。我点击[点击]按钮。没有任何反应,浏览器没有提示。我切换到终端预计看到您按下按钮,但我看到的只是Running on: http://localhost:3000/
我看不到您在客户端或服务器的任何位置按下按钮。
所以在helloworld.js,下面的代码段应该做什么?
Template.hello.events = {
'click input' : function() {
// template data, if any, is available in 'this'
if (typeof console !== 'undefined')
console.log("You pressed the button");
}
};
}
我最好的猜测是在该行Running on: http://localhost:3000/
低于端你按下此按钮会出现每次我按一下按钮,但没有任何反应。