aboutsummaryrefslogtreecommitdiffstats
path: root/docs/content/guide
diff options
context:
space:
mode:
authorMisko Hevery2011-11-10 18:47:47 -0800
committerMisko Hevery2011-11-14 20:31:18 -0800
commitb09595a3c12ba761772084b94767b635c5bbfaf2 (patch)
treea86f45599ee86964ea2bd09e5c336280ef98a769 /docs/content/guide
parentf6d98f1472338a77b2f146087bcb8560f472e5d1 (diff)
downloadangular.js-b09595a3c12ba761772084b94767b635c5bbfaf2.tar.bz2
fix(doc) cleanup all api doc link warnings
Diffstat (limited to 'docs/content/guide')
-rw-r--r--docs/content/guide/dev_guide.bootstrap.auto_bootstrap.ngdoc2
-rw-r--r--docs/content/guide/dev_guide.di.ngdoc2
-rw-r--r--docs/content/guide/dev_guide.di.understanding_di.ngdoc12
-rw-r--r--docs/content/guide/dev_guide.di.using_di_controllers.ngdoc2
-rw-r--r--docs/content/guide/dev_guide.e2e-testing.ngdoc8
-rw-r--r--docs/content/guide/dev_guide.expressions.ngdoc8
-rw-r--r--docs/content/guide/dev_guide.forms.ngdoc18
-rw-r--r--docs/content/guide/dev_guide.i18n.ngdoc14
-rw-r--r--docs/content/guide/dev_guide.mvc.understanding_controller.ngdoc8
-rw-r--r--docs/content/guide/dev_guide.scopes.internals.ngdoc52
-rw-r--r--docs/content/guide/dev_guide.scopes.ngdoc10
-rw-r--r--docs/content/guide/dev_guide.scopes.understanding_scopes.ngdoc2
-rw-r--r--docs/content/guide/dev_guide.services.$location.ngdoc20
-rw-r--r--docs/content/guide/dev_guide.services.creating_services.ngdoc6
-rw-r--r--docs/content/guide/dev_guide.services.injecting_controllers.ngdoc2
-rw-r--r--docs/content/guide/dev_guide.services.managing_dependencies.ngdoc12
-rw-r--r--docs/content/guide/dev_guide.services.ngdoc2
-rw-r--r--docs/content/guide/dev_guide.services.registering_services.ngdoc8
-rw-r--r--docs/content/guide/dev_guide.services.testing_services.ngdoc4
-rw-r--r--docs/content/guide/dev_guide.services.understanding_services.ngdoc4
-rw-r--r--docs/content/guide/dev_guide.templates.filters.creating_filters.ngdoc15
-rw-r--r--docs/content/guide/dev_guide.templates.filters.ngdoc4
-rw-r--r--docs/content/guide/dev_guide.templates.filters.using_filters.ngdoc4
-rw-r--r--docs/content/guide/dev_guide.templates.ngdoc2
-rw-r--r--docs/content/guide/dev_guide.unit-testing.ngdoc6
25 files changed, 111 insertions, 116 deletions
diff --git a/docs/content/guide/dev_guide.bootstrap.auto_bootstrap.ngdoc b/docs/content/guide/dev_guide.bootstrap.auto_bootstrap.ngdoc
index 438b3d38..a75dc52f 100644
--- a/docs/content/guide/dev_guide.bootstrap.auto_bootstrap.ngdoc
+++ b/docs/content/guide/dev_guide.bootstrap.auto_bootstrap.ngdoc
@@ -98,4 +98,4 @@ APIs are bound to fields of this global object.
## Related API
-{@link api/angular.compile Compiler API}
+{@link api/angular.module.NG.$compile Compiler API}
diff --git a/docs/content/guide/dev_guide.di.ngdoc b/docs/content/guide/dev_guide.di.ngdoc
index fc303e58..f9ff49c4 100644
--- a/docs/content/guide/dev_guide.di.ngdoc
+++ b/docs/content/guide/dev_guide.di.ngdoc
@@ -28,5 +28,5 @@ book.
## Related API
-* {@link api/angular.service Service API}
+* {@link api/angular.module.NG Service API}
* {@link api/angular.injector Angular Injector API}
diff --git a/docs/content/guide/dev_guide.di.understanding_di.ngdoc b/docs/content/guide/dev_guide.di.understanding_di.ngdoc
index 202fa3c6..1dc9bd85 100644
--- a/docs/content/guide/dev_guide.di.understanding_di.ngdoc
+++ b/docs/content/guide/dev_guide.di.understanding_di.ngdoc
@@ -7,15 +7,15 @@ While DI is widely used in statically typed languages such as Java or C++, it ha
used in JavaScript. Angular brings the benefits of DI into JavaScript apps.
In angular, DI is implemented as a subsystem that manages dependencies between services,
-controllers, widgets, and filters. The most important of these are {@link api/angular.service
+controllers, widgets, and filters. The most important of these are {@link api/angular.module.NG
services}.
Services are objects that handle common tasks in web applications. Angular provides several{@link
-api/angular.service built-in services}, and you can create your own custom services.
+api/angular.module.NG built-in services}, and you can create your own custom services.
The main job of angular's DI subsystem is to provide services to angular components that depend on
them. The way the DI subsystem provides services is as follows: all services are registered with
-angular's {@link api/angular.service service API}, and all components that depend on services
+angular's {@link api/angular.module.NG service API}, and all components that depend on services
define those dependencies as a property (`$inject`). With this information, the DI subsystem
manages the creation of service objects and the provision of those objects to the components that
need 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
<pre>
// create a root scope
-var rootScope = angular.scope();
+var rootScope = angular.module.NG.$rootScope.Scope();
// access the service locator
var myService = rootScope.$service('myService');
</pre>
@@ -74,7 +74,7 @@ equivalent:
<pre>
// given a user defined service
-angular.service('serviceA', ...);
+angular.module.NG('serviceA', ...);
// inject '$window', 'serviceA', curry 'name';
function fnA($window, serviceA, name){};
@@ -102,4 +102,4 @@ code and insert the `$inject` into the source code so that it can be minified/ob
## Related API
-* {@link api/angular.service Services API}
+* {@link api/angular.module.NG Services API}
diff --git a/docs/content/guide/dev_guide.di.using_di_controllers.ngdoc b/docs/content/guide/dev_guide.di.using_di_controllers.ngdoc
index 035d1663..3d087d18 100644
--- a/docs/content/guide/dev_guide.di.using_di_controllers.ngdoc
+++ b/docs/content/guide/dev_guide.di.using_di_controllers.ngdoc
@@ -14,7 +14,7 @@ MyController.$inject = ['$route'];
</pre>
In this example, the `MyController` constructor function takes one argument, the {@link
-api/angular.service.$route $route} service. Angular is then responsible for supplying the instance
+api/angular.module.NG.$route $route} service. Angular is then responsible for supplying the instance
of `$route` to the controller when the constructor is instantiated. There are two ways to cause
controller instantiation – by configuring routes with the `$route` service, or by referencing the
controller from the HTML template, as follows:
diff --git a/docs/content/guide/dev_guide.e2e-testing.ngdoc b/docs/content/guide/dev_guide.e2e-testing.ngdoc
index d725e07a..6dbb9c1e 100644
--- a/docs/content/guide/dev_guide.e2e-testing.ngdoc
+++ b/docs/content/guide/dev_guide.e2e-testing.ngdoc
@@ -78,19 +78,19 @@ Returns the window.location.search of the currently loaded page in the test fram
Returns the window.location.hash (without `#`) of the currently loaded page in the test frame.
## browser().location().url()
-Returns the {@link api/angular.service.$location $location.url()} of the currently loaded page in
+Returns the {@link api/angular.module.NG.$location $location.url()} of the currently loaded page in
the test frame.
## browser().location().path()
-Returns the {@link api/angular.service.$location $location.path()} of the currently loaded page in
+Returns the {@link api/angular.module.NG.$location $location.path()} of the currently loaded page in
the test frame.
## browser().location().search()
-Returns the {@link api/angular.service.$location $location.search()} of the currently loaded page
+Returns the {@link api/angular.module.NG.$location $location.search()} of the currently loaded page
in the test frame.
## browser().location().hash()
-Returns the {@link api/angular.service.$location $location.hash()} of the currently loaded page in
+Returns the {@link api/angular.module.NG.$location $location.hash()} of the currently loaded page in
the test frame.
## expect(future).{matcher}
diff --git a/docs/content/guide/dev_guide.expressions.ngdoc b/docs/content/guide/dev_guide.expressions.ngdoc
index b9417b38..4867f9d0 100644
--- a/docs/content/guide/dev_guide.expressions.ngdoc
+++ b/docs/content/guide/dev_guide.expressions.ngdoc
@@ -165,15 +165,15 @@ JavaScript method instead.
Built-in types have methods like `[].push()`, but the richness of these methods is limited.
Consider the example below, which allows you to do a simple search over a canned set of contacts.
The example would be much more complicated if we did not have the `Array:$filter()`. There is no
-built-in method on `Array` called {@link api/angular.Array.filter $filter} and angular doesn't add
+built-in method on `Array` called {@link api/angular.module.NG.$filter.filter $filter} and angular doesn't add
it to `Array.prototype` because that could collide with other JavaScript frameworks.
For this reason the scope expression evaluator augments the built-in types to make them act like
-they have extra methods. The actual method for `$filter()` is `angular.Array.filter()`. You can
+they have extra methods. The actual method for `$filter()` is `angular.module.NG.$filter.filter()`. You can
call it from JavaScript.
Extensions: You can further extend the expression vocabulary by adding new methods to
-`angular.Array` or `angular.String`, etc.
+`angular.module.NG.$filter` or `angular.String`, etc.
<doc:example>
<doc:source>
@@ -212,7 +212,7 @@ of filters like this:
name | uppercase
-The expression evaluator simply passes the value of name to angular.filter.uppercase.
+The expression evaluator simply passes the value of name to angular.module.NG.$filter.uppercase.
Chain filters using this syntax:
diff --git a/docs/content/guide/dev_guide.forms.ngdoc b/docs/content/guide/dev_guide.forms.ngdoc
index aaad66a5..5b4b1478 100644
--- a/docs/content/guide/dev_guide.forms.ngdoc
+++ b/docs/content/guide/dev_guide.forms.ngdoc
@@ -18,14 +18,14 @@ Forms consist of all of the following:
A form groups a set of widgets together into a single logical data-set. A form is created using
the {@link api/angular.widget.form &lt;form&gt;} element that calls the
-{@link api/angular.service.$formFactory $formFactory} service. The form is responsible for managing
+{@link api/angular.module.NG.$formFactory $formFactory} service. The form is responsible for managing
the widgets and for tracking validation information.
A form is:
- The collection which contains widgets or other forms.
- Responsible for marshaling data from the model into a widget. This is
- triggered by {@link api/angular.scope.$watch $watch} of the model expression.
+ triggered by {@link api/angular.module.NG.$rootScope.Scope#$watch $watch} of the model expression.
- Responsible for marshaling data from the widget into the model. This is
triggered by the widget emitting the `$viewChange` event.
- Responsible for updating the validation state of the widget, when the widget emits
@@ -57,7 +57,7 @@ In Angular, a widget is the term used for the UI with which the user input. Exam
bult-in Angular widgets are {@link api/angular.widget.input input} and
{@link api/angular.widget.select select}. Widgets provide the rendering and the user
interaction logic. Widgets should be declared inside a form, if no form is provided an implicit
-form {@link api/angular.service.$formFactory $formFactory.rootForm} form is used.
+form {@link api/angular.module.NG.$formFactory $formFactory.rootForm} form is used.
Widgets are implemented as Angular controllers. A widget controller:
@@ -218,7 +218,7 @@ The following example demonstrates:
# Life-cycle
- The `<form>` element triggers creation of a new form {@link dev_guide.scopes scope} using the
- {@link api/angular.service.$formFactory $formfactory}. The new form scope is added to the
+ {@link api/angular.module.NG.$formFactory $formfactory}. The new form scope is added to the
`<form>` element using the jQuery `.data()` method for later retrieval under the key `$form`.
The form also sets up these listeners:
@@ -227,8 +227,8 @@ The following example demonstrates:
- `$valid` / `$invalid` - This event is emitted by the widget on validation state change.
- `<input>` element triggers the creation of the widget using the
- {@link api/angular.service.$formFactory $formfactory.$createWidget()} method. The `$createWidget()`
- creates new widget instance by calling the current scope {@link api/angular.scope.$new .$new()} and
+ {@link api/angular.module.NG.$formFactory $formfactory.$createWidget()} method. The `$createWidget()`
+ creates new widget instance by calling the current scope {@link api/angular.module.NG.$rootScope.Scope#$new .$new()} and
registers these listeners:
- `$watch` on the model scope.
@@ -244,7 +244,7 @@ The following example demonstrates:
1. The DOM element fires the `change` event which the widget intercepts. Widget then emits
a `$viewChange` event which includes the new user-entered value. (Remember that the DOM events
are outside of the Angular environment so the widget must emit its event within the
- {@link api/angular.scope.$apply $apply} method).
+ {@link api/angular.module.NG.$rootScope.Scope#$apply $apply} method).
2. The form's `$viewChange` listener copies the user-entered value to the widget's `$viewValue`
property. Since the `$viewValue` is the raw value as entered by user, it may need to be
translated to a different format/type (for example, translating a string to a number).
@@ -517,7 +517,7 @@ function LoginController() {
describe('LoginController', function() {
it('should disable login button when form is invalid', function() {
- var scope = angular.scope();
+ var scope = angular.module.NG.$rootScope.Scope();
var loginController = scope.$new(LoginController);
// In production the 'loginForm' form instance gets set from the view,
@@ -570,7 +570,7 @@ function LoginController(){
describe('LoginController', function() {
it('should disable login button when form is invalid', function() {
- var scope = angular.scope();
+ var scope = angular.module.NG.$rootScope.Scope();
var loginController = scope.$new(LoginController);
var input = angular.element('<input>');
diff --git a/docs/content/guide/dev_guide.i18n.ngdoc b/docs/content/guide/dev_guide.i18n.ngdoc
index 7a6bbdee..50031b5d 100644
--- a/docs/content/guide/dev_guide.i18n.ngdoc
+++ b/docs/content/guide/dev_guide.i18n.ngdoc
@@ -17,15 +17,15 @@ abstracted bits.
**What level of support for i18n/l10n is currently in Angular?**
Currently, Angular supports i18n/l10n for {@link
-http://docs.angularjs.org/#!/api/angular.filter.date datetime}, {@link
-http://docs.angularjs.org/#!/api/angular.filter.number number} and {@link
-http://docs.angularjs.org/#!/api/angular.filter.currency currency} filters.
+http://docs.angularjs.org/#!/api/angular.module.NG.$filter.date datetime}, {@link
+http://docs.angularjs.org/#!/api/angular.module.NG.$filter.number number} and {@link
+http://docs.angularjs.org/#!/api/angular.module.NG.$filter.currency currency} filters.
Additionally, Angular supports localizable pluralization support provided by the {@link
api/angular.widget.ng:pluralize ng:pluralize widget}.
All localizable Angular components depend on locale-specific rule sets managed by the {@link
-api/angular.service.$locale $locale service}.
+api/angular.module.NG.$locale $locale service}.
For readers who want to jump straight into examples, we have a few web pages that showcase how to
use Angular filters with various locale rule sets. You can find these examples either on {@link
@@ -90,8 +90,8 @@ because an extra script needs to be loaded.
**Currency symbol "gotcha"**
-Angular's {@link http://docs.angularjs.org/#!/api/angular.filter.currency currency filter} allows
-you to use the default currency symbol from the {@link api/angular.service.$locale locale service},
+Angular's {@link http://docs.angularjs.org/#!/api/angular.module.NG.$filter.currency currency filter} allows
+you to use the default currency symbol from the {@link api/angular.module.NG.$locale locale service},
or you can provide the filter with a custom currency symbol. If your app will be used only in one
locale, it is fine to rely on the default currency symbol. However, if you anticipate that viewers
in other locales might use your app, you should provide your own currency symbol to make sure the
@@ -104,7 +104,7 @@ browser will specify the locale as ja, and the balance of '¥1000.00' will be sh
will really upset your client.
In this case, you need to override the default currency symbol by providing the {@link
-http://docs.angularjs.org/#!/api/angular.filter.currency currency filter} with a currency symbol as
+http://docs.angularjs.org/#!/api/angular.module.NG.$filter.currency currency filter} with a currency symbol as
a parameter when you configure the filter, for example, {{ 1000 | currency:"USD$"}}. This way,
Angular will always show a balance of 'USD$1000' and disregard any locale changes.
diff --git a/docs/content/guide/dev_guide.mvc.understanding_controller.ngdoc b/docs/content/guide/dev_guide.mvc.understanding_controller.ngdoc
index 833dc005..779e7247 100644
--- a/docs/content/guide/dev_guide.mvc.understanding_controller.ngdoc
+++ b/docs/content/guide/dev_guide.mvc.understanding_controller.ngdoc
@@ -4,7 +4,7 @@
In angular, a controller is a JavaScript function(type/class) that is used to augment instances of
angular {@link dev_guide.scopes Scope}, excluding the root scope. When you or angular create a new
-child scope object via the {@link api/angular.scope.$new scope.$new} API , there is an
+child scope object via the {@link api/angular.module.NG.$rootScope.Scope#$new scope.$new} API , there is an
option to pass in a controller as a method argument. This will tell angular to associate the
controller with the new scope and to augment its behavior.
@@ -77,9 +77,9 @@ instances).
# Associating Controllers with Angular Scope Objects
-You can associate controllers with scope objects explicitly via the {@link api/angular.scope.$new
+You can associate controllers with scope objects explicitly via the {@link api/angular.module.NG.$rootScope.Scope#$new
scope.$new} api or implicitly via the {@link api/angular.directive.ng:controller ng:controller
-directive} or {@link api/angular.service.$route $route service}.
+directive} or {@link api/angular.module.NG.$route $route service}.
## Controller Constructor and Methods Example
@@ -160,7 +160,7 @@ input box) in the second button.
## Controller Inheritance Example
-Controller inheritance in angular is based on {@link api/angular.scope Scope} inheritance. Let's
+Controller inheritance in angular is based on {@link api/angular.module.NG.$rootScope.Scope Scope} inheritance. Let's
have a look at an example:
<pre>
diff --git a/docs/content/guide/dev_guide.scopes.internals.ngdoc b/docs/content/guide/dev_guide.scopes.internals.ngdoc
index 47e90c18..1a6acfdd 100644
--- a/docs/content/guide/dev_guide.scopes.internals.ngdoc
+++ b/docs/content/guide/dev_guide.scopes.internals.ngdoc
@@ -11,8 +11,8 @@ pattern, a scope's properties comprise both the model and the controller methods
### Scope characteristics
-- Scopes provide APIs ({@link api/angular.scope.$watch $watch}) to observe model mutations.
-- Scopes provide APIs ({@link api/angular.scope.$apply $apply}) to propagate any model changes
+- Scopes provide APIs ({@link api/angular.module.NG.$rootScope.Scope#$watch $watch}) to observe model mutations.
+- Scopes provide APIs ({@link api/angular.module.NG.$rootScope.Scope#$apply $apply}) to propagate any model changes
through the system into the view from outside of the "Angular realm" (controllers, services,
Angular event handlers).
- Scopes can be nested to isolate application components while providing access to shared model
@@ -24,19 +24,19 @@ available as `this` within the given context. (Note: This api will change before
### Root scope
Every application has a root scope, which is the ancestor of all other scopes. The root scope is
-responsible for creating the injector which is assigned to the {@link api/angular.scope.$service
+responsible for creating the injector which is assigned to the {@link api/angular.module.NG.$rootScope.Scope#$service
$service} property, and initializing the services.
### What is scope used for?
-{@link dev_guide.expressions Expressions} in the view are {@link api/angular.scope.$eval evaluated}
+{@link dev_guide.expressions Expressions} in the view are {@link api/angular.module.NG.$rootScope.Scope#$eval evaluated}
against the current scope. When HTML DOM elements are attached to a scope, expressions in those
elements are evaluated against the attached scope.
There are two kinds of expressions:
- Binding expressions, which are observations of property changes. Property changes are reflected
-in the view during the {@link api/angular.scope.$digest digest cycle}.
+in the view during the {@link api/angular.module.NG.$rootScope.Scope#$digest digest cycle}.
- Action expressions, which are expressions with side effects. Typically, the side effects cause
execution of a method in a controller in response to a user action, such as clicking on a button.
@@ -59,7 +59,7 @@ A property write will always write to the current scope. This means that a write
property within the scope it writes to, as shown in the following example.
<pre>
-var root = angular.scope();
+var root = angular.module.NG.$rootScope.Scope();
var child = root.$new();
root.name = 'angular';
@@ -75,25 +75,25 @@ expect(root.name).toEqual('angular');
### Scope life cycle
1. **Creation**
- * You can create the root scope via {@link api/angular.scope angular.scope()}.
- * To create a child scopes, you should call {@link api/angular.scope.$new parentScope.$new()}.
+ * You can create the root scope via {@link api/angular.module.NG.$rootScope.Scope angular.module.NG.$rootScope.Scope()}.
+ * To create a child scopes, you should call {@link api/angular.module.NG.$rootScope.Scope#$new parentScope.$new()}.
2. **Watcher registration**
Watcher registration can happen at any time and on any scope (root or child) via {@link
-api/angular.scope.$watch scope.$watch()} API.
+api/angular.module.NG.$rootScope.Scope#$watch scope.$watch()} API.
3. **Model mutation**
For mutations to be properly observed, you should make them only within the execution of the
-function passed into {@link api/angular.scope.$apply scope.$apply()} call. (Angular apis do this
+function passed into {@link api/angular.module.NG.$rootScope.Scope#$apply scope.$apply()} call. (Angular apis do this
implicitly, so no extra `$apply` call is needed when doing synchronous work in controllers, or
-asynchronous work with {@link api/angular.service.$xhr $xhr} or {@link api/angular.service.$defer
+asynchronous work with {@link api/angular.module.NG.$xhr $xhr} or {@link api/angular.module.NG.$defer
$defer} services.
4. **Mutation observation**
- At the end of each `$apply` call {@link api/angular.scope.$digest $digest} cycle is started on
+ At the end of each `$apply` call {@link api/angular.module.NG.$rootScope.Scope#$digest $digest} cycle is started on
the root scope, which then propagates throughout all child scopes.
During the `$digest` cycle, all `$watch-ers` expressions or functions are checked for model
@@ -102,7 +102,7 @@ mutation and if a mutation is detected, the `$watch-er` listener is called.
5. **Scope destruction**
When child scopes are no longer needed, it is the responsibility of the child scope creator to
-destroy them via {@link api/angular.scope.$destroy scope.$destroy()} API. This will stop
+destroy them via {@link api/angular.module.NG.$rootScope.Scope#$destroy scope.$destroy()} API. This will stop
propagation of `$digest` calls into the child scope and allow for memory used by the child scope
models to be reclaimed by the garbage collector.
@@ -117,28 +117,28 @@ scopes come into play throughout and get a sense of their interactions.
1. At application compile time, a root scope is created and is attached to the root `<HTML>` DOM
element.
1. The root scope creates an {@link api/angular.injector injector} which is assigned to the
-{@link api/angular.scope.$service $service} property of the root scope.
- 2. Any eager {@link api/angular.scope.$service services} are initialized at this point.
+{@link api/angular.module.NG.$rootScope.Scope#$service $service} property of the root scope.
+ 2. Any eager {@link api/angular.module.NG.$rootScope.Scope#$service services} are initialized at this point.
2. During the compilation phase, the {@link dev_guide.compiler compiler} matches {@link
api/angular.directive directives} against the DOM template. The directives usually fall into one of
two categories:
- Observing {@link api/angular.directive directives}, such as double-curly expressions
-`{{expression}}`, register listeners using the {@link api/angular.scope.$watch $watch()} method.
+`{{expression}}`, register listeners using the {@link api/angular.module.NG.$rootScope.Scope#$watch $watch()} method.
This type of directive needs to be notified whenever the expression changes so that it can update
the view.
- Listener directives, such as {@link api/angular.directive.ng:click ng:click}, register a
listener with the DOM. When the DOM listener fires, the directive executes the associated
-expression and updates the view using the {@link api/angular.scope.$apply $apply()} method.
+expression and updates the view using the {@link api/angular.module.NG.$rootScope.Scope#$apply $apply()} method.
3. When an external event (such as a user action, timer or XHR) is received, the associated {@link
dev_guide.expressions expression} must be applied to the scope through the {@link
-api/angular.scope.$apply $apply()} method so that all listeners are updated correctly.
+api/angular.module.NG.$rootScope.Scope#$apply $apply()} method so that all listeners are updated correctly.
### Directives that create scopes
In most cases, {@link api/angular.directive directives} and scopes interact but do not create new
instances of scope. However, some directives, such as {@link api/angular.directive.ng:controller
ng:controller} and {@link api/angular.widget.@ng:repeat ng:repeat}, create new child scopes using
-the {@link api/angular.scope.$new $new()} method and then attach the child scope to the
+the {@link api/angular.module.NG.$rootScope.Scope#$new $new()} method and then attach the child scope to the
corresponding DOM element. You can retrieve a scope for any DOM element by using an
`angular.element(aDomElement).scope()` method call.)
@@ -148,13 +148,13 @@ Scopes and controllers interact with each other in the following situations:
- Controllers use scopes to expose controller methods to templates (see {@link
api/angular.directive.ng:controller ng:controller}).
- Controllers define methods (behavior) that can mutate the model (properties on the scope).
- - Controllers may register {@link api/angular.scope.$watch watches} on the model. These watches
+ - Controllers may register {@link api/angular.module.NG.$rootScope.Scope#$watch watches} on the model. These watches
execute immediately after the controller behavior executes, but before the DOM gets updated.
See the {@link dev_guide.mvc.understanding_controller controller docs} for more information.
### Updating scope properties
-You can update a scope by calling its {@link api/angular.scope.$apply $apply()} method with an
+You can update a scope by calling its {@link api/angular.module.NG.$rootScope.Scope#$apply $apply()} method with an
expression or a function as the function argument. However it is typically not necessary to do this
explicitly. In most cases, angular intercepts all external events (such as user interactions, XHRs,
and timers) and wraps their callbacks into the `$apply()` method call on the scope object for you
@@ -177,8 +177,8 @@ doesn't need to worry about propagating the `$digest` call from the parent scope
This happens automatically.
## Scopes in unit-testing
-You can create scopes, including the root scope, in tests using the {@link api/angular.scope
-angular.scope()} API. This allows you to mimic the run-time environment and have full control over
+You can create scopes, including the root scope, in tests using the {@link api/angular.module.NG.$rootScope.Scope
+angular.module.NG.$rootScope.Scope()} API. This allows you to mimic the run-time environment and have full control over
the life cycle of the scope so that you can assert correct model transitions. Since these scopes
are created outside the normal compilation process, their life cycles must be managed by the test.
@@ -188,7 +188,7 @@ within the unit-tests.
<pre>
// example of a test
- var scope = angular.scope();
+ var scope = angular.module.NG.$rootScope.Scope();
scope.$watch('name', function(scope, name){
scope.greeting = 'Hello ' + name + '!';
});
@@ -210,7 +210,7 @@ service instances, as shown in the following example.
<pre>
var myLocation = {};
-var scope = angular.scope(angular.service, {$location: myLocation});
+var scope = angular.module.NG.$rootScope.Scope(angular.module.NG, {$location: myLocation});
expect(scope.$service('$location')).toEqual(myLocation);
</pre>
@@ -221,5 +221,5 @@ expect(scope.$service('$location')).toEqual(myLocation);
## Related API
-* {@link api/angular.scope Angular Scope API}
+* {@link api/angular.module.NG.$rootScope.Scope Angular Scope API}
diff --git a/docs/content/guide/dev_guide.scopes.ngdoc b/docs/content/guide/dev_guide.scopes.ngdoc
index b59bd87b..dcf0dd1d 100644
--- a/docs/content/guide/dev_guide.scopes.ngdoc
+++ b/docs/content/guide/dev_guide.scopes.ngdoc
@@ -13,15 +13,15 @@ the contexts in which Angular creates data-bindings between the model and the vi
In addition to providing the context in which data is evaluated, Angular scope objects watch for
model changes. The scope objects also notify all components interested in any model changes (for
-example, functions registered through {@link api/angular.scope.$watch $watch}, bindings created by
+example, functions registered through {@link api/angular.module.NG.$rootScope.Scope#$watch $watch}, bindings created by
{@link api/angular.directive.ng:bind ng:bind}, or HTML input elements).
Angular scope objects:
* Link the model, controller and view template together.
-* Provide the mechanism to watch for model changes ({@link api/angular.scope.$watch $watch}).
-* Apply model changes to the system ({@link api/angular.scope.$apply $apply}).
-* Provide the context in which expressions are evaluated ({@link api/angular.scope.$eval $eval}).
+* Provide the mechanism to watch for model changes ({@link api/angular.module.NG.$rootScope.Scope#$watch $watch}).
+* Apply model changes to the system ({@link api/angular.module.NG.$rootScope.Scope#$apply $apply}).
+* Provide the context in which expressions are evaluated ({@link api/angular.module.NG.$rootScope.Scope#$eval $eval}).
## Related Topics
@@ -31,5 +31,5 @@ Angular scope objects:
## Related API
-* {@link api/angular.scope Angular Scope API}
+* {@link api/angular.module.NG.$rootScope.Scope Angular Scope API}
diff --git a/docs/content/guide/dev_guide.scopes.understanding_scopes.ngdoc b/docs/content/guide/dev_guide.scopes.understanding_scopes.ngdoc
index 03b20517..84ef55dc 100644
--- a/docs/content/guide/dev_guide.scopes.understanding_scopes.ngdoc
+++ b/docs/content/guide/dev_guide.scopes.understanding_scopes.ngdoc
@@ -63,4 +63,4 @@ The following illustration shows the DOM and angular scopes for the example abov
## Related API
-* {@link api/angular.scope Angular Scope API}
+* {@link api/angular.module.NG.$rootScope.Scope Angular Scope API}
diff --git a/docs/content/guide/dev_guide.services.$location.ngdoc b/docs/content/guide/dev_guide.services.$location.ngdoc
index a8e79111..b1a3c23a 100644
--- a/docs/content/guide/dev_guide.services.$location.ngdoc
+++ b/docs/content/guide/dev_guide.services.$location.ngdoc
@@ -134,7 +134,7 @@ current URL without creating a new browser history record you can call:
</pre>
Note that the setters don't update `window.location` immediately. Instead, `$location` service is
-aware of the {@link api/angular.scope scope} life-cycle and coalesces multiple `$location`
+aware of the {@link api/angular.module.NG.$rootScope.Scope scope} life-cycle and coalesces multiple `$location`
mutations into one "commit" to the `window.location` object during the scope `$digest` phase. Since
multiple changes to the $location's state will be pushed to the browser as a single change, it's
enough to call the `replace()` method just once to make the entire "commit" a replace operation
@@ -210,7 +210,7 @@ In this mode, `$location` uses Hashbang URLs in all browsers.
### Example
<pre>
-angular.service('$locationConfig', function() {
+angular.module.NG('$locationConfig', function() {
return {
html5Mode: false,
hashPrefix: '!'
@@ -258,7 +258,7 @@ having to worry about whether the browser displaying your app supports the histo
### Example
<pre>
-angular.service('$locationConfig', function() {
+angular.module.NG('$locationConfig', function() {
return {
html5Mode: true,
hashPrefix: '!'
@@ -461,7 +461,7 @@ In this examples we use `<base href="/base/index.html" />`
function initEnv(name) {
var root = angular.element(document.getElementById(name + '-mode'));
- var scope = angular.scope(null, {
+ var scope = angular.module.NG.$rootScope.Scope(null, {
$locationConfig: {html5Mode: true, hashPrefix: '!'},
$browser: browsers[name],
$document: root,
@@ -488,11 +488,11 @@ In this examples we use `<base href="/base/index.html" />`
The `$location` service allows you to change only the URL; it does not allow you to reload the
page. When you need to change the URL and reload the page or navigate to a different page, please
-use a lower level API, {@link api/angular.service.$window $window.location.href}.
+use a lower level API, {@link api/angular.module.NG.$window $window.location.href}.
## Using $location outside of the scope life-cycle
-`$location` knows about Angular's {@link api/angular.scope scope} life-cycle. When a URL changes in
+`$location` knows about Angular's {@link api/angular.module.NG.$rootScope.Scope scope} life-cycle. When a URL changes in
the browser it updates the `$location` and calls `$apply` so that all $watchers / $observers are
notified.
When you change the `$location` inside the `$digest` phase everything is ok; `$location` will
@@ -512,10 +512,10 @@ hashPrefix.
# Testing with the $location service
When using `$location` service during testing, you are outside of the angular's {@link
-api/angular.scope scope} life-cycle. This means it's your responsibility to call `scope.$apply()`.
+api/angular.module.NG.$rootScope.Scope scope} life-cycle. This means it's your responsibility to call `scope.$apply()`.
<pre>
-angular.service('$serviceUnderTest', function($location) {
+angular.module.NG('$serviceUnderTest', function($location) {
// whatever it does...
};
@@ -523,7 +523,7 @@ describe('$serviceUnderTest', function() {
var scope, $location, $sut;
beforeEach(function() {
- scope = angular.scope();
+ scope = angular.module.NG.$rootScope.Scope();
$location = scope.$service('$location');
$sut = scope.$service('$serviceUnderTest');
});
@@ -636,7 +636,7 @@ this.$watch('$location.path()', function(scope, path) {
# Related API
-* {@link api/angular.service.$location $location API}
+* {@link api/angular.module.NG.$location $location API}
diff --git a/docs/content/guide/dev_guide.services.creating_services.ngdoc b/docs/content/guide/dev_guide.services.creating_services.ngdoc
index 74ade376..b3c3a2ed 100644
--- a/docs/content/guide/dev_guide.services.creating_services.ngdoc
+++ b/docs/content/guide/dev_guide.services.creating_services.ngdoc
@@ -6,7 +6,7 @@ While angular offers several useful services, for any nontrivial application you
to write your own custom services. To do this you begin by registering a service factory function
that angular's DI will use to create the service object when it is needed.
-The `angular.service` method accepts three parameters:
+The `angular.module.NG` method accepts three parameters:
- `{string} name` - Name of the service.
- `{function()} factory` - Factory function(called just once by DI).
@@ -32,7 +32,7 @@ stores all notifications; after the third one, the service displays all of the n
window alert.
<pre>
- angular.service('notify', function(win) {
+ angular.module.NG('notify', function(win) {
var msgs = [];
return function(msg) {
msgs.push(msg);
@@ -55,4 +55,4 @@ window alert.
## Related API
-* {@link api/angular.service Angular Service API}
+* {@link api/angular.module.NG Angular Service API}
diff --git a/docs/content/guide/dev_guide.services.injecting_controllers.ngdoc b/docs/content/guide/dev_guide.services.injecting_controllers.ngdoc
index 56823eb9..6d4709ee 100644
--- a/docs/content/guide/dev_guide.services.injecting_controllers.ngdoc
+++ b/docs/content/guide/dev_guide.services.injecting_controllers.ngdoc
@@ -77,4 +77,4 @@ it('should test service', function() {
## Related API
-{@link api/angular.service Angular Service API}
+{@link api/angular.module.NG Angular Service API}
diff --git a/docs/content/guide/dev_guide.services.managing_dependencies.ngdoc b/docs/content/guide/dev_guide.services.managing_dependencies.ngdoc
index 9513df4c..a172f97c 100644
--- a/docs/content/guide/dev_guide.services.managing_dependencies.ngdoc
+++ b/docs/content/guide/dev_guide.services.managing_dependencies.ngdoc
@@ -19,7 +19,7 @@ provided by angular's web framework:
*
* @param {*} message Message to be logged.
*/
-angular.service('batchLog', function($defer, $log) {
+angular.module.NG('batchLog', function($defer, $log) {
var messageQueue = [];
function log() {
@@ -43,7 +43,7 @@ angular.service('batchLog', function($defer, $log) {
* routeTemplateMonitor monitors each $route change and logs the current
* template via the batchLog service.
*/
-angular.service('routeTemplateMonitor', function($route, batchLog) {
+angular.module.NG('routeTemplateMonitor', function($route, batchLog) {
this.$on('$afterRouteChange', function() {
batchLog($route.current ? $route.current.template : null);
});
@@ -52,10 +52,10 @@ angular.service('routeTemplateMonitor', function($route, batchLog) {
Things to notice in this example:
-* The `batchLog` service depends on the built-in {@link api/angular.service.$defer $defer} and
-{@link api/angular.service.$log $log} services, and allows messages to be logged into the
+* The `batchLog` service depends on the built-in {@link api/angular.module.NG.$defer $defer} and
+{@link api/angular.module.NG.$log $log} services, and allows messages to be logged into the
`console.log` in batches.
-* The `routeTemplateMonitor` service depends on the built-in {@link api/angular.service.$route
+* The `routeTemplateMonitor` service depends on the built-in {@link api/angular.module.NG.$route
$route} service as well as our custom `batchLog` service.
* The `routeTemplateMonitor` service is declared to be eager, so that it is started as soon as the
application starts.
@@ -80,5 +80,5 @@ order to inject.
## Related API
-* {@link api/angular.service Angular Service API}
+* {@link api/angular.module.NG Angular Service API}
* {@link api/angular.injector Angular Injector API}
diff --git a/docs/content/guide/dev_guide.services.ngdoc b/docs/content/guide/dev_guide.services.ngdoc
index ac295357..ec3771da 100644
--- a/docs/content/guide/dev_guide.services.ngdoc
+++ b/docs/content/guide/dev_guide.services.ngdoc
@@ -19,4 +19,4 @@ most often used with {@link dev_guide.di dependency injection}, also a key featu
## Related API
-* {@link api/angular.service Angular Service API}
+* {@link api/angular.module.NG Angular Service API}
diff --git a/docs/content/guide/dev_guide.services.registering_services.ngdoc b/docs/content/guide/dev_guide.services.registering_services.ngdoc
index 1af1b1b9..f3f64459 100644
--- a/docs/content/guide/dev_guide.services.registering_services.ngdoc
+++ b/docs/content/guide/dev_guide.services.registering_services.ngdoc
@@ -3,11 +3,11 @@
@description
To register a service, register a factory function that creates the service with angular's
-Injector. The Injector is exposed as {@link api/angular.scope.$service scope.$service}. The
+Injector. The Injector is exposed as {@link api/angular.module.NG.$rootScope.Scope#$service scope.$service}. The
following pseudo-code shows a simple service registration:
<pre>
-angular.service('service id', function() {
+angular.module.NG('service id', function() {
var shinyNewServiceInstance;
//factory function body that constructs shinyNewServiceInstance
return shinyNewServiceInstance;
@@ -30,7 +30,7 @@ which happens when the angular {@link dev_guide.bootstrap application initialize
To override the default, you can request that a service is eagerly instantiated as follows:
<pre>
-angular.service('service id', function() {
+angular.module.NG('service id', function() {
var shinyNewServiceInstance;
//factory function body that constructs shinyNewServiceInstance
return shinyNewServiceInstance;
@@ -66,4 +66,4 @@ important.
## Related API
-* {@link api/angular.service Angular Service API}
+* {@link api/angular.module.NG Angular Service API}
diff --git a/docs/content/guide/dev_guide.services.testing_services.ngdoc b/docs/content/guide/dev_guide.services.testing_services.ngdoc
index 1768b63d..f988c11b 100644
--- a/docs/content/guide/dev_guide.services.testing_services.ngdoc
+++ b/docs/content/guide/dev_guide.services.testing_services.ngdoc
@@ -11,7 +11,7 @@ var mock, notify;
beforeEach(function() {
mock = {alert: jasmine.createSpy()};
- notify = angular.service('notify')(mock);
+ notify = angular.module.NG('notify')(mock);
});
it('should not alert first two notifications', function() {
@@ -53,6 +53,6 @@ it('should clear messages after alert', function() {
## Related API
-* {@link api/angular.service Angular Service API}
+* {@link api/angular.module.NG Angular Service API}
diff --git a/docs/content/guide/dev_guide.services.understanding_services.ngdoc b/docs/content/guide/dev_guide.services.understanding_services.ngdoc
index 118a4db1..0000c658 100644
--- a/docs/content/guide/dev_guide.services.understanding_services.ngdoc
+++ b/docs/content/guide/dev_guide.services.understanding_services.ngdoc
@@ -3,7 +3,7 @@
@description
Angular services are singletons that carry out specific tasks common to web apps, such as the
-{@link api/angular.service.$xhr $xhr service} that provides low level access to the browser's
+{@link api/angular.module.NG.$xhr $xhr service} that provides low level access to the browser's
`XMLHttpRequest` object.
To use an angular service, you identify it as a dependency for the dependent (a controller, or
@@ -33,5 +33,5 @@ above). You can also create your own custom services.
## Related API
-* {@link api/angular.service Angular Service API}
+* {@link api/angular.module.NG Angular Service API}
* {@link api/angular.injector Injector API}
diff --git a/docs/content/guide/dev_guide.templates.filters.creating_filters.ngdoc b/docs/content/guide/dev_guide.templates.filters.creating_filters.ngdoc
index 9404ad65..1f34b32b 100644
--- a/docs/content/guide/dev_guide.templates.filters.creating_filters.ngdoc
+++ b/docs/content/guide/dev_guide.templates.filters.creating_filters.ngdoc
@@ -2,7 +2,7 @@
@name Developer Guide: Templates: Filters: Creating Angular Filters
@description
-Writing your own filter is very easy: just define a JavaScript function on the `angular.filter`
+Writing your own filter is very easy: just define a JavaScript function on the `angular.module.NG.$filter`
object.
The framework passes in the input value as the first argument to your function. Any filter
arguments are passed in as additional function arguments.
@@ -19,9 +19,9 @@ text upper-case and assigns color.
<doc:example>
<doc:source>
<script type="text/javascript">
-angular.module.MyReverseModule = function MyModule($provide) {
- $provide.filter('reverse', function() {
- return function(input, uppercase, color) {
+angular.module.MyReverseModule = function MyModule($filterProvider) {
+ $filterProvider.register('reverse', function() {
+ return function(input, uppercase) {
var out = "";
for (var i = 0; i < input.length; i++) {
out = input.charAt(i) + out;
@@ -30,10 +30,6 @@ angular.module.MyReverseModule = function MyModule($provide) {
if (uppercase) {
out = out.toUpperCase();
}
- // DOM manipulation using $element
- if (color) {
- this.$element.css('color', color);
- }
return out;
}
});
@@ -49,7 +45,6 @@ angular.module.MyReverseModule = function MyModule($provide) {
No filter: {{greeting}}<br>
Reverse: {{greeting|reverse}}<br>
Reverse + uppercase: {{greeting|reverse:true}}<br>
- Reverse + uppercase + blue: {{greeting|reverse:true:"blue"}}
</div>
</doc:source>
<doc:scenario>
@@ -69,4 +64,4 @@ angular.module.MyReverseModule = function MyModule($provide) {
## Related API
-* {@link api/angular.filter Angular Filter API}
+* {@link api/angular.module.NG.$filter Angular Filter API}
diff --git a/docs/content/guide/dev_guide.templates.filters.ngdoc b/docs/content/guide/dev_guide.templates.filters.ngdoc
index 933ddfd3..922d36d9 100644
--- a/docs/content/guide/dev_guide.templates.filters.ngdoc
+++ b/docs/content/guide/dev_guide.templates.filters.ngdoc
@@ -11,7 +11,7 @@ displaying it to the user. You can pass expressions through a chain of filters l
name | uppercase
-The expression evaluator simply passes the value of name to `angular.filter.uppercase()`.
+The expression evaluator simply passes the value of name to `angular.module.NG.$filter.uppercase()`.
In addition to formatting data, filters can also modify the DOM. This allows filters to handle
tasks such as conditionally applying CSS styles to filtered output.
@@ -24,4 +24,4 @@ tasks such as conditionally applying CSS styles to filtered output.
## Related API
-* {@link api/angular.filter Angular Filter API}
+* {@link api/angular.module.NG.$filter Angular Filter API}
diff --git a/docs/content/guide/dev_guide.templates.filters.using_filters.ngdoc b/docs/content/guide/dev_guide.templates.filters.using_filters.ngdoc
index f7dd5766..c5c5cbb8 100644
--- a/docs/content/guide/dev_guide.templates.filters.using_filters.ngdoc
+++ b/docs/content/guide/dev_guide.templates.filters.using_filters.ngdoc
@@ -2,7 +2,7 @@
@name Developer Guide: Templates: Filters: Using Angular Filters
@description
-Filters can be part of any {@link api/angular.scope} evaluation but are typically used to format
+Filters can be part of any {@link api/angular.module.NG.$rootScope.Scope} evaluation but are typically used to format
expressions in bindings in your templates:
{{ expression | filter }}
@@ -37,4 +37,4 @@ argument that specifies how many digits to display to the right of the decimal p
## Related API
-* {@link api/angular.filter Angular Filter API}
+* {@link api/angular.module.NG.$filter Angular Filter API}
diff --git a/docs/content/guide/dev_guide.templates.ngdoc b/docs/content/guide/dev_guide.templates.ngdoc
index a90f4c38..edf9c1cc 100644
--- a/docs/content/guide/dev_guide.templates.ngdoc
+++ b/docs/content/guide/dev_guide.templates.ngdoc
@@ -43,7 +43,7 @@ and {@link dev_guide.expressions expressions}:
In a simple single-page app, the template consists of HTML, CSS, and angular directives contained
in just one HTML file (usually `index.html`). In a more complex app, you can display multiple views
within one main page using "partials", which are segments of template located in separate HTML
-files. You "include" the partials in the main page using the {@link api/angular.service.$route
+files. You "include" the partials in the main page using the {@link api/angular.module.NG.$route
$route} service in conjunction with the {@link api/angular.widget.ng:view ng:view} directive. An
example of this technique is shown in the {@link tutorial/ angular tutorial}, in steps seven and
eight.
diff --git a/docs/content/guide/dev_guide.unit-testing.ngdoc b/docs/content/guide/dev_guide.unit-testing.ngdoc
index 4ca5473c..96758866 100644
--- a/docs/content/guide/dev_guide.unit-testing.ngdoc
+++ b/docs/content/guide/dev_guide.unit-testing.ngdoc
@@ -247,16 +247,16 @@ that such a test tells a story, rather then asserting random bits which don't se
## Filters
-{@link api/angular.filter Filters} are functions which transform the data into user readable
+{@link api/angular.module.NG.$filter Filters} are functions which transform the data into user readable
format. They are important because they remove the formatting responsibility from the application
logic, further simplifying the application logic.
<pre>
-angular.filter('length', function(text){
+angular.module.NG.$filter('length', function(text){
return (''+(text||'')).length;
});
-var length = angular.filter('length');
+var length = angular.module.NG.$filter('length');
expect(length(null)).toEqual(0);
expect(length('abc')).toEqual(3);
</pre>