Today I tried to dynamically create and use some directives at runtime. 
 Then I realized I have to spell them differently when I create them from 
when I use them.  This is silly.  Now I have to procedurally translate them 
between camelCase and snake-case myself.

One of my previous co-workers also thought this was stupid.  He was looking 
at my angular templates and then trying to grep the source code for where 
those attributes are used.  If I were using jQuery, those attributes would 
have shown up in the source code in selectors.  But since it's angular, 
they were camelCased, and thus un-greppable.

Being able to grep your source code for identifiers is one of those 
unspoken rules of software development, isn't it?

Since a directive's name is just a string, why can't we just write it the 
way it is going to appear, in snake-case?  I've heard the argument that it 
needs to be a valid JavaScript identifier, but when is it ever interpreted 
in JavaScript?  Angular is moving toward Polymer anyway, and in Polymer you 
have to name tags with dashes in them in the first place.

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to