"Your First Meteor Application": Form won't log to console (link to code on MeteorPad included) -
going through your first meteor application , i'm stuck. i'm in chapter 9 "forms" @ section titled "the event object, part 1."
i can't log console.
here's i'm @ via meteorpad:
source code (i've made comment saying "this i'm stuck" on line 46 of common.js)
you missing <form>
tag.
this how insert event should look.
template.addplayerform.events({ 'submit form': function(event,template){ event.preventdefault(); playerslist.insert({ name:template.$('#newplayer').val(), score:8, }) return false; } });
and html.
<template name="addplayerform"> <form> <input type="text" name="playername" id="newplayer"> <input type="submit" value="add player"> </form> </template>
here same meteorpad above changes.
Comments
Post a Comment