@@ -7,15 +7,15 @@ While DI is widely used in statically typed languages such as Java or C++, it ha
77used in JavaScript. Angular brings the benefits of DI into JavaScript apps.
88
99In angular, DI is implemented as a subsystem that manages dependencies between services,
10- controllers, widgets, and filters. The most important of these are {@link api/angular.service
10+ controllers, widgets, and filters. The most important of these are {@link api/angular.module.NG
1111services}.
1212
1313Services are objects that handle common tasks in web applications. Angular provides several{@link
14- api/angular.service built-in services}, and you can create your own custom services.
14+ api/angular.module.NG built-in services}, and you can create your own custom services.
1515
1616The main job of angular's DI subsystem is to provide services to angular components that depend on
1717them. The way the DI subsystem provides services is as follows: all services are registered with
18- angular's {@link api/angular.service service API}, and all components that depend on services
18+ angular's {@link api/angular.module.NG service API}, and all components that depend on services
1919define those dependencies as a property (`$inject`). With this information, the DI subsystem
2020manages the creation of service objects and the provision of those objects to the components that
2121need them, at the time they need them. The following illustration steps through the sequence of
@@ -49,7 +49,7 @@ achieve the necessary isolation by having each test create its own separate root
4949
5050<pre>
5151// create a root scope
52- var rootScope = angular.scope ();
52+ var rootScope = angular.module.NG.$rootScope.Scope ();
5353// access the service locator
5454var myService = rootScope.$service('myService');
5555</pre>
@@ -74,7 +74,7 @@ equivalent:
7474
7575<pre>
7676// given a user defined service
77- angular.service ('serviceA', ...);
77+ angular.module.NG ('serviceA', ...);
7878
7979// inject '$window', 'serviceA', curry 'name';
8080function fnA($window, serviceA, name){};
@@ -102,4 +102,4 @@ code and insert the `$inject` into the source code so that it can be minified/ob
102102
103103## Related API
104104
105- * {@link api/angular.service Services API}
105+ * {@link api/angular.module.NG Services API}
0 commit comments