aboutsummaryrefslogtreecommitdiffstats
path: root/docs/content/guide/di.ngdoc
diff options
context:
space:
mode:
authorMatt Rohrer2012-09-26 15:30:55 +0200
committerBrian Ford2013-01-17 19:10:46 -0500
commit93070f14885801de7e264b04fdf4cb54b7dc7d9b (patch)
tree9a96a5e4c8ea0e18dc775c2b92bc148c57c00a87 /docs/content/guide/di.ngdoc
parent3c8583e5dd10ff356ac473f53e920fb10eb41571 (diff)
downloadangular.js-93070f14885801de7e264b04fdf4cb54b7dc7d9b.tar.bz2
docs(guide): minor grammar fixes
Diffstat (limited to 'docs/content/guide/di.ngdoc')
-rw-r--r--docs/content/guide/di.ngdoc9
1 files changed, 4 insertions, 5 deletions
diff --git a/docs/content/guide/di.ngdoc b/docs/content/guide/di.ngdoc
index 8dec62e8..a9280103 100644
--- a/docs/content/guide/di.ngdoc
+++ b/docs/content/guide/di.ngdoc
@@ -47,7 +47,7 @@ is simply handed the `greeter` at runtime.
This is desirable, but it puts the responsibility of getting hold of the dependency onto the
code responsible for the construction of `SomeClass`.
-To manage the responsibility of dependency creation, each angular application has an {@link
+To manage the responsibility of dependency creation, each Angular application has an {@link
api/angular.injector injector}. The injector is a service locator that is responsible for
construction and lookup of dependencies.
@@ -109,7 +109,7 @@ deal with the injector. This setup does not break the Law of Demeter.
How does the injector know what service needs to be injected?
-The application developer needs to provide annotation information, that the injector uses in order
+The application developer needs to provide annotation information that the injector uses in order
to resolve the dependencies. Throughout Angular certain API functions are invoked using the
injector, as per the API documentation. The injector needs to know what services to inject into
the function. Below are three equivalent ways of annotating your code with service name
@@ -186,14 +186,13 @@ For this reason the third annotation style is provided as well.
Keep in mind that all of the annotation styles are equivalent and can be used anywhere in Angular
where injection is supported.
-
# Where can I use DI?
DI is pervasive throughout Angular. It is typically used in controllers and factory methods.
## DI in controllers
-Controllers are classes which are responsible for application behavior. Recommended way of
+Controllers are classes which are responsible for application behavior. The recommended way of
declaring controllers is:
<pre>
@@ -211,7 +210,7 @@ declaring controllers is:
## Factory methods
Factory methods are responsible for creating most objects in Angular. Examples are directives,
-services, and filters. The factory methods are register with the module, and the recommended way
+services, and filters. The factory methods are registered with the module, and the recommended way
of declaring factories is:
<pre>