You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+22-12Lines changed: 22 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,16 +1,32 @@
1
1
# Angular Style Guide
2
2
3
-
## High Level Goals
3
+
## Introduction
4
+
5
+
This style guide addresses four areas: High-level Goals; Directory and File Structure; Parts of Angular; and General Patterns and Anti-patterns.
6
+
7
+
High-level Goals are those that guide low-level decision making.
8
+
9
+
Directory and File Structure addresses the way we organise our code and why.
10
+
11
+
Parts of Angular addresses the core parts of AngularJS — routes, directives, controllers, modules, and templates.
12
+
13
+
General Patterns and Anti-patterns addresses those that do not pertain to a specific part, but instead to the application at large.
14
+
15
+
## Table of Contents
16
+
1.[High-level Goals](#high-level-goals)
17
+
2.[Directory and File Structure](#directory-and-file-structure)
18
+
3.[Parts of Angular](#parts-of-angular)
19
+
4.[General Patterns and Anti-patterns](#general-patterns-and-anti-patterns)
20
+
21
+
## High-level Goals
4
22
5
23
1. Prioritise readability.
6
24
2. Be explicit, not implicit.
7
25
3. Favour composability over inheritance.
8
26
4. Think forward – ES6 and Web Components (Angular 2.0).
9
27
5. Know [when to deviate](http://legacy.python.org/dev/peps/pep-0008/#a-foolish-consistency-is-the-hobgoblin-of-little-minds) from the style guide.
10
28
11
-
---
12
-
13
-
## Directories & Files
29
+
## Directory and File Structure
14
30
15
31
### Folder structure
16
32
@@ -74,13 +90,12 @@ Configures Providers. For example, `$locationProvider.html5Mode(true);`.
74
90
75
91
### Routes
76
92
77
-
A view that points to a URL. Like components, each route contains all the HTML, CSS, JavaScript, and other dependencies needed to render itself.
93
+
A view, made up of components and unique pieces of UI, that points to a URL. Like components, each route contains all the HTML, CSS, JavaScript, and other dependencies needed to render itself.
78
94
79
95
### Services
80
96
81
97
Services contain Business logic. For example, `$http` abstractions.
0 commit comments