docs(dependency injecton): rewrite

This commit is contained in:
Misko Hevery
2012-02-27 12:14:48 -08:00
parent 581f93ae56
commit 2e90cdc3d4
12 changed files with 244 additions and 290 deletions

View File

@@ -7,7 +7,7 @@ to write your own custom services. To do this you begin by registering a service
with a module either via the {@link api/angular.module Module#factory api} or directly
via the {@link api/angular.module.AUTO.$provide $provide} api inside of module config function.
All angular services participate in {@link dev_guide.di dependency injection (DI)} by registering
All angular services participate in {@link di dependency injection (DI)} by registering
themselves with Angular's DI system (injector) under a `name` (id) as well as by declaring
dependencies which need to be provided for the factory function of the registered service. The
ability to swap dependencies for mocks/stubs/dummies in tests allows for services to be highly
@@ -49,7 +49,7 @@ create this instance when called.
# Dependencies
Services can not only be depended upon, but also have its own dependencies. These can be specified
as arguments of the factory function. {@link dev_guide.di.understanding_di Read more} about the DI
as arguments of the factory function. {@link di.understanding_di Read more} about the DI
in Angular and the use of array notation and $inject property to make DI annotation
minification-proof.