Skip to content

Commit

Permalink
docs(guide/*): improve explanation of strictDi
Browse files Browse the repository at this point in the history
  • Loading branch information
btford committed Oct 27, 2014
1 parent c3fcbbd commit d1ccf17
Show file tree
Hide file tree
Showing 3 changed files with 245 additions and 263 deletions.
17 changes: 17 additions & 0 deletions docs/content/guide/bootstrap.ngdoc
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,23 @@ If the {@link ng.directive:ngApp `ng-app`} directive is found then Angular will:
</html>
```

As a best practice, consider consider adding an `ng-strict-di` directive on the same element as
`ng-app`:


```html
<!doctype html>
<html ng-app="optionalModuleName" ng-strict-di>
<body>
I can add: {{ 1+2 }}.
<script src="angular.js"></script>
</body>
</html>
```

This will ensure that all services in your application are properly annotated.
See the {@link guide/di#using-strict-dependency-injection dependancy injection strict mode} docs
for more.


## Manual Initialization
Expand Down
Loading

0 comments on commit d1ccf17

Please sign in to comment.