Skip to content

Commit ac0a3d5

Browse files
committed
fixed notes
1 parent d36e380 commit ac0a3d5

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

README.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ Many of my styles have been from the many pair programming sessions [Ward Bell](
278278
}
279279
```
280280
281-
- Note: You can avoid any [jshint](http://www.jshint.com/) warnings by placing the comment below above the line of code.
281+
- Note: You can avoid any [jshint](http://www.jshint.com/) warnings by placing the comment below above the line of code.
282282
283283
```javascript
284284
/* jshint validthis: true */
@@ -335,7 +335,7 @@ Many of my styles have been from the many pair programming sessions [Ward Bell](
335335
}
336336
```
337337
338-
- Note: If the function is a 1 liner it consider keeping it right up top, as long as readability is not affected.
338+
- Note: If the function is a 1 liner it consider keeping it right up top, as long as readability is not affected.
339339
340340
```javascript
341341
/* avoid */
@@ -466,7 +466,7 @@ Many of my styles have been from the many pair programming sessions [Ward Bell](
466466
467467
- **Singletons**: Services are instantiated with the `new` keyword, use `this` for public methods and variables. Can also use a factory, which I recommend for consistency.
468468
469-
- Note: [All AngularJS services are singletons](https://docs.angularjs.org/guide/services). This means that there is only one instance of a given service per injector.
469+
- Note: [All AngularJS services are singletons](https://docs.angularjs.org/guide/services). This means that there is only one instance of a given service per injector.
470470
471471
```javascript
472472
// service
@@ -505,7 +505,7 @@ Many of my styles have been from the many pair programming sessions [Ward Bell](
505505
506506
- **Singletons**: Factories are singletons and return an object that contains the members of the service.
507507
508-
- Note: [All AngularJS services are singletons](https://docs.angularjs.org/guide/services).
508+
- Note: [All AngularJS services are singletons](https://docs.angularjs.org/guide/services).
509509
510510
- **Public Members Up Top**: Expose the callable members of the service (it's interface) at the top, using a technique derived from the [Revealing Module Pattern](http://addyosmani.com/resources/essentialjsdesignpatterns/book/#revealingmodulepatternjavascript).
511511
@@ -1235,19 +1235,21 @@ Many of my styles have been from the many pair programming sessions [Ward Bell](
12351235
12361236
- **Overall Guidelines**: Have a near term view of implementation and a long term vision. In other words, start small and but keep in mind on where the app is heading down the road. All of the app's code goes in a root folder named `app`. All content is 1 feature per file. Each controller, service, module, view is in its own file. Small deviations are OK for a set of small, short directives in a `directive.js` file. All 3rd party vendor scripts are stored in another root folder and not in the `app` folder. I didn't write them and I don't want them cluttering my app (`bower_components`, `scripts`, `lib`).
12371237
1238+
- Note: Find more details and reasoning behind the structure at [this original post on application structure](http://www.johnpapa.net/angular-app-structuring-guidelines/).
1239+
12381240
- **Layout**: Place components that define the overall layout of the application in a folder named `layout`. These may include a shell view and controller may act as the container for the app, navigation, menus, content areas, and other regions.
12391241
1240-
- *Why?*: Organizes all layout in a single place re-used throughout the application.
1242+
- *Why?*: Organizes all layout in a single place re-used throughout the application.
12411243
12421244
- **Folders-by-Feature Structure**: Create folders named for the feature they represent. When a folder grows to contain more than 7 files, start to consider creating a folder for them. Your threshold may be different, so adjust as needed.
12431245
1244-
- *Why?*: A developer can locate the code, identify what each file represents at a glance, the structure is flat as can be, and there is no repetitive nor redundant names.
1246+
- *Why?*: A developer can locate the code, identify what each file represents at a glance, the structure is flat as can be, and there is no repetitive nor redundant names.
12451247
1246-
- *Why?*: The LIFT guidelines are all covered.
1248+
- *Why?*: The LIFT guidelines are all covered.
12471249
1248-
- *Why?*: Helps reduce the app from becoming cluttered through organizing the content and keeping them aligned with the LIFT guidelines.
1250+
- *Why?*: Helps reduce the app from becoming cluttered through organizing the content and keeping them aligned with the LIFT guidelines.
12491251
1250-
- *Why?*: When there are a lot of files (10+) locating them is easier with a consistent folder structures and more difficult in flat structures.
1252+
- *Why?*: When there are a lot of files (10+) locating them is easier with a consistent folder structures and more difficult in flat structures.
12511253
12521254
```javascript
12531255
/**

0 commit comments

Comments
 (0)