The difference between <template iterate = "..."> and <template repeat = "...">
I saw a few Dart / tutorials examples that look like <template iterate="thing in collection"> and others that use <template repeat="thing in collection"> . They seem to be doing the same. What is the difference between them and why is one recommended instead of the other in this situation?
Here, right from the change log:
A repeat template has been added, which, unlike an iteration template, if used as an attribute, repeats the tag instead of the child elements of the tag.
The reason is that the following HTML is not valid for most HTML parsers:
<select> <template iterate='name in results'> <option>{{name}}</option> </template> </select>` Tagtemplate not allowed within select , so the solution should use :
<select> <option template repeat='name in results'>{{name}}</option> </select> template repeat was added recently (April 2013), and it will replace template iterate in the end AFAIK, but both are currently supported.