Skip to content

Commit cc2a2e4

Browse files
committed
chore: add NAMING.md
Closes angular#3787
1 parent e72305e commit cc2a2e4

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

NAMING.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
Naming Conventions in Angular2
2+
---
3+
4+
In general Angular2 should follow Java naming conventions.
5+
6+
7+
Classes:
8+
- Example: `Compiler`, `ApplicationMetadata`
9+
- Camel case with first letter upper-case
10+
- In general prefer single words. (This is so that when appending `Proto` or `Factory` the class
11+
is still reasonable to work with.)
12+
- Should not end with `Impl` or any other word which describes a specific implemenation of an
13+
interface.
14+
15+
16+
Interfaces:
17+
- Follow the same rules as Classes
18+
- Should not have `I` or `Interface` in the name or any other way of identifing it as an interface.
19+
20+
21+
Methods and functions:
22+
- Example: `bootstrap`, `ngProbe`
23+
- Should be camel case with first lower case
24+
25+
26+
Constants
27+
- Example: `CORE_DIRECTIVES`
28+
- Should be all uppercase with SNAKE_CASE
29+
30+
31+

0 commit comments

Comments
 (0)