Skip to content

Commit 942d3e1

Browse files
committed
formatting of NOTE sections
1 parent 1576aa9 commit 942d3e1

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

README.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,7 @@ Many of my styles have been from the many pair programming sessions [Ward Bell](
569569
/* implementation details */
570570
```
571571
572-
-Note: There are many naming options for directives, especially since they can be used in narrow or wide scopes. Choose one the makes the directive and it's file name distinct and clear. Some examples are below, but see the naming section for more recommendations.
572+
- Note: There are many naming options for directives, especially since they can be used in narrow or wide scopes. Choose one the makes the directive and it's file name distinct and clear. Some examples are below, but see the naming section for more recommendations.
573573
574574
- **Limit DOM Manipulation**: When manipulating the DOM directly, use a directive. If alternative ways can be used such as using CSS to set styles or the [animation services](https://docs.angularjs.org/api/ngAnimate), Angular templating, [`ngShow`](https://docs.angularjs.org/api/ng/directive/ngShow) or [`ngHide`](https://docs.angularjs.org/api/ng/directive/ngHide), then use those instead. For example, if the directive simply hide and shows, use ngHide/ngShow, but if the directive does more, combining hide and show inside a directive may improve performance as it reduces watchers.
575575
@@ -798,7 +798,7 @@ Many of my styles have been from the many pair programming sessions [Ward Bell](
798798
799799
*Why?*: [`ng-min`](https://github.com/btford/ngmin) is deprecated
800800
801-
- The following code is not using minification safe dependencies.
801+
- The following code is not using minification safe dependencies.
802802
803803
```javascript
804804
angular
@@ -818,7 +818,7 @@ Many of my styles have been from the many pair programming sessions [Ward Bell](
818818
}
819819
```
820820
821-
- When the above code is run through ng-annotate it will produces the following output with the `$inject` annotation and become minification-safe.
821+
- When the above code is run through ng-annotate it will produces the following output with the `$inject` annotation and become minification-safe.
822822
823823
```javascript
824824
angular
@@ -841,11 +841,10 @@ Many of my styles have been from the many pair programming sessions [Ward Bell](
841841

842842
```
843843
844-
- Note: If `ng-annotate` detects injection has already been made (e.g. `@ngInject` was detected), it will not duplicate the `$inject` code.
845-
846-
- Note: Starting from AngularJS 1.3 use the [`ngApp`](https://docs.angularjs.org/api/ng/directive/ngApp) directive's `ngStrictDi` parameter. When present the injector will be created in "strict-di" mode causing the application to fail to invoke functions which do not use explicit function annotation (these may not be minification safe). Debugging info will be logged to the console to help track down the offending code.
847-
`<body ng-app="APP" ng-strict-di>`
844+
- Note: If `ng-annotate` detects injection has already been made (e.g. `@ngInject` was detected), it will not duplicate the `$inject` code.
848845
846+
- Note: Starting from AngularJS 1.3 use the [`ngApp`](https://docs.angularjs.org/api/ng/directive/ngApp) directive's `ngStrictDi` parameter. When present the injector will be created in "strict-di" mode causing the application to fail to invoke functions which do not use explicit function annotation (these may not be minification safe). Debugging info will be logged to the console to help track down the offending code.
847+
`<body ng-app="APP" ng-strict-di>`
849848
850849
- **Use Gulp or Grunt for ng-annotate**: Use [gulp-ng-annotate](https://www.npmjs.org/package/gulp-ng-annotate) or [grunt-ng-annotate](https://www.npmjs.org/package/grunt-ng-annotate) in an automated build task. Inject `/* @ngInject */` prior to any function that has dependencies.
851850

0 commit comments

Comments
 (0)