Angularjs code/naming conventions

Posted by Dalorzo on Stack Overflow See other posts from Stack Overflow or by Dalorzo
Published on 2013-12-27T14:58:38Z Indexed on 2014/06/02 9:26 UTC
Read the original article Hit count: 167

Filed under:

Does anyone know if exists any official or most accepted reference for Angular naming conventions to use when we build our applications?

Angular has a lot of different type of components such as filters, directives, services and so on. Wouldn't you agree that having a reference naming convention when we implement them in our applications will make sense?

For example:

If we need to create new filters how should we name them like [Something]Filter or filter[Something] or something else?

And same applies for Controllers, Services, Directives and so on.

Other things I wonder about is if variables/functions that belongs to the scope should have an special prefix or suffix. In some situations it may be useful to have a way to differentiate them from functions and other (none angular code).

© Stack Overflow or respective owner

Related posts about angularjs