Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 6fdaa3d

Browse files
mekanecaitp
authored andcommitted
docs(guide/di): correct a few awkward sentences
Closes #8678
1 parent d250dd4 commit 6fdaa3d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

docs/content/guide/di.ngdoc

+5-5
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ These can be used interchangeably as you see fit and are equivalent.
135135

136136
### Implicit Dependencies
137137

138-
The simplest way to get hold of the dependencies, is to assume that the function parameter names
138+
The simplest way to get hold of the dependencies is to assume that the function parameter names
139139
are the names of the dependencies.
140140

141141
```js
@@ -144,7 +144,7 @@ function MyController($scope, greeter) {
144144
}
145145
```
146146

147-
Given a function the injector can infer the names of the service to inject by examining the
147+
Given a function the injector can infer the names of the services to inject by examining the
148148
function declaration and extracting the parameter names. In the above example `$scope`, and
149149
`greeter` are two services which need to be injected into the function.
150150

@@ -154,7 +154,7 @@ rename the method parameter names. This makes this way of annotating only useful
154154

155155
### `$inject` Property Annotation
156156

157-
To allow the minifiers to rename the function parameters and still be able to inject right services,
157+
To allow the minifiers to rename the function parameters and still be able to inject the right services,
158158
the function needs to be annotated with the `$inject` property. The `$inject` property is an array
159159
of service names to inject.
160160

@@ -166,7 +166,7 @@ MyController['$inject'] = ['$scope', 'greeter'];
166166
```
167167

168168
In this scenario the ordering of the values in the `$inject` array must match the ordering of the
169-
arguments to inject. Using above code snippet as an example, `$scope` will be injected into
169+
arguments to inject. Using the above code snippet as an example, `$scope` will be injected into
170170
`renamed$scope` and `greeter` into `renamedGreeter`. Care must be taken that the `$inject`
171171
annotation is kept in sync with the actual arguments in the function declaration.
172172

@@ -206,7 +206,7 @@ someModule.factory('greeter', ['$window', function(renamed$window) {
206206
}]);
207207
```
208208

209-
Here, instead of simply providing the factory function, we pass an array, whose elements consist of
209+
Here, instead of simply providing the factory function, we pass an array whose elements consist of
210210
a list of strings (the names of the dependencies) followed by the function itself.
211211

212212
Keep in mind that all of the annotation styles are equivalent and can be used anywhere in Angular

0 commit comments

Comments
 (0)