can someone tell me why the rendered Live HTML in this example saves the cleanup and then redraws in an infinite loop? This sample code maximizes the processor on my laptop.
Environment:
- Meteor 0.3.7
- Mac OS Lion
- Tested in Safari 5.1.7, Chrome Canary 22.0.1189, Chrome 21.0.1180, Firefox 11.0 and 13.0
initial creation of the project:
meteor create test cd test meteor add coffeescript mv test.js test.coffee meteor
test.coffee:
Records = new Meteor.Collection("records") if Meteor.is_client Template.table.records = -> Records.find() Template.table.rowCount = -> Records.find().count() if Meteor.is_server Meteor.startup -> if Records.find().count() is 0 for i in [1..1000] Records.insert({some:"test", data: "just", to: "check"})
test.html:
<head> <title>test</title> </head> <body> {{> table}} </body> <template name="table"> <table> <caption>{{rowCount}}</caption> {{#each records}} <tr> <td>{{some}}</td> <td>{{data}}</td> <td>{{to}}</td> </tr> {{/each}} </table> </template>
Lloyd
source share