Hi,

the Angular team recently announced to put more effort into community best 
practices like app structure and naming conventions (see 
here<http://blog.angularjs.org/2014/02/an-angularjs-style-guide-and-best.html>).
 
I think this is really great and much needed to get more structure into 
Angular apps. One thing that the current 
guide<https://docs.google.com/document/d/1XXMvReO8-Awi1EZXAXS4PzDzdNvV6pGcuaF4Q9821Es/pub>lacks
 is a naming convention for Angular templates (file ending). This is 
no problem if you develop an Angular-only app, because you could just 
default to .html. At least you *normally* wouldn't need that.
I'm using 
grunt-bower-install<https://github.com/stephenplusplus/grunt-bower-install>
/wiredep <https://github.com/taptapship/wiredep> a lot recently and I've 
developed a nice build chain around Bower and Grunt. Like wiredep this 
heavily relies on the file ending of files listed inside the main property 
of every bower.json. Angular templates can use different build tools than 
normal HTML (see 
grunt-angular-template<https://github.com/ericclemmons/grunt-angular-templates>as
 an example). This just didn't work easily, if I just use 
.html for file endings.

So I have two motivations to use a specific file ending for Angular 
templates:

   1. I want to distinguish Angular templates and plain HTML files for 
   every non-Angular-only app. (E.g. I use Angular in legacy projects.)
   2. I want to distinguish Angular templates so I can use different build 
   tools for Angular templates and plain HTML files.

I think these are strong arguments. Example of files ending for other 
template engines are .hbs for Handlebars or .ejs for Embedded JS. As 
Angular templates are *just HTML* we probably don't want to introduce a 
completely new file ending and *extend* the HTML file ending instead to 
something like .ng.html...?

Just to be complete: We already distinguish between HTML and Angular 
templates in some cases → <script type="text/ng-template">

-- 
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