Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="statsForTeam">
  <meta charset="utf-8">
  <title>JS Bin</title>
</head>
<body>
  
<div id='out'></div>
  
<script id="app" type="text/stache">
  {{#each teams}}
    <h2>Name: {{.}}</h2>
    <ul>
    {{#eachOf(~statsForTeam(.))  }}
      <li>{{value}}</li>
    {{/each}}
    </ul>
  {{/each}}
  <h2>Add Stat</h2>
  
  <form ($submit)="formAddStat(%element, %event)">
    Team: <select name='team'>
      <option value="red">Red</option>
      <option value="blue">Blue</option>
    </select>
    Value <input name='value'/>
    <input type='submit'/>
  </form>
</script>
  
  
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.js"></script>
<script src="//canjs.com/release/2.3.7/can.jquery.js"></script>
<script src="//canjs.com/release/2.3.7/can.stache.js"></script>
</body>
</html>
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
justinbmeyerpro
0viewers