I've noticed the Ember.js docs explain the way to name templates is by setting the <script>
tag's data-template-name
value to the name of the template. But in Tom Dale's latest screencast on the Ember.js documentation site he is naming templates with ids. I assume they are both valid ways to name templates in Ember. Why should one use data-template-name
as apposed to ids?
While both work, using data-template-name
gives you the freedom of using element ids which won't collide with your template names.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With