Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Naming Ember.js templates with data-template-name

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?

like image 887
Glen Selle Avatar asked Apr 08 '13 15:04

Glen Selle


1 Answers

While both work, using data-template-name gives you the freedom of using element ids which won't collide with your template names.

like image 74
zeppelin Avatar answered Oct 22 '22 19:10

zeppelin