Skip to content

Instantly share code, notes, and snippets.

@mplatts
Created November 27, 2014 02:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mplatts/c6e741afab87ed36c780 to your computer and use it in GitHub Desktop.
Save mplatts/c6e741afab87ed36c780 to your computer and use it in GitHub Desktop.
templates2 - adding games
<!-- client/views/games.html -->
<template name="games">
<h3>Games</h3>
{{#if creating}}
<form class="form-create">
<select name="teamOne">
{{#each teams}}
<option value="{{_id}}">{{name}}</option>
{{/each}}
</select>
vs
<select name="teamTwo">
{{#each teams}}
<option value="{{_id}}">{{name}}</option>
{{/each}}
</select>
<button type="submit">Submit</button>
<a class="cancel" href="#">Cancel</a>
</form>
{{else}}
<a class="create" href="#">Create</a>
{{/if}}
<ul>
{{#each games}}
{{> game}}
{{/each}}
</ul>
</template>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment