docs(*): simplify doc urls

we now have two types of namespaces:

- true namespace: angular.* - used for all global apis
- virtual namespace: ng.*, ngMock.*, ... - used for all DI modules

the virual namespaces have services under the second namespace level (e.g. ng.)
and filters and directives prefixed with filter: and directive: respectively
(e.g. ng.filter:orderBy, ng.directive:ngRepeat)

this simplifies urls and makes them a lot shorter while still avoiding name collisions
This commit is contained in:
Igor Minar 2012-06-11 23:49:24 -07:00
parent fc0b2b5715
commit f16150d5f1
106 changed files with 803 additions and 799 deletions

View file

@ -1,5 +1,5 @@
@ngdoc overview @ngdoc overview
@name angular.module.ng @name ng
@description @description
The `ng` is an angular module which contains all of the core angular services. The `ng` is an angular module which contains all of the core angular services.

View file

@ -141,11 +141,11 @@ In this example we have a simple app which consist of two screens:
# Things to notice # Things to notice
* Routes are defined in the `AppCntl` class. The initialization of the controller causes the * Routes are defined in the `AppCntl` class. The initialization of the controller causes the
initialization of the {@link api/angular.module.ng.$route $route} service with the proper URL initialization of the {@link api/ng.$route $route} service with the proper URL
routes. routes.
* The {@link api/angular.module.ng.$route $route} service then watches the URL and instantiates the * The {@link api/ng.$route $route} service then watches the URL and instantiates the
appropriate controller when the URL changes. appropriate controller when the URL changes.
* The {@link api/angular.module.ng.$compileProvider.directive.ngView ngView} widget loads the * The {@link api/ng.directive:ngView ngView} widget loads the
view when the URL changes. It also sets the view scope to the newly instantiated controller. view when the URL changes. It also sets the view scope to the newly instantiated controller.
* Changing the URL is sufficient to change the controller and view. It makes no difference whether * Changing the URL is sufficient to change the controller and view. It makes no difference whether
the URL is changed programatically or by the user. the URL is changed programatically or by the user.

View file

@ -102,11 +102,11 @@ allow a user to enter data.
# Things to notice # Things to notice
* The user data model is initialized {@link api/angular.module.ng.$compileProvider.directive.ngController controller} and is * The user data model is initialized {@link api/ng.directive:ngController controller} and is
available in the {@link api/angular.module.ng.$rootScope.Scope scope} with the initial data. available in the {@link api/ng.$rootScope.Scope scope} with the initial data.
* For debugging purposes we have included a debug view of the model to better understand what * For debugging purposes we have included a debug view of the model to better understand what
is going on. is going on.
* The {@link api/angular.module.ng.$compileProvider.directive.input input directives} simply refer * The {@link api/ng.directive:input input directives} simply refer
to the model and are data-bound. to the model and are data-bound.
* The inputs validate. (Try leaving them blank or entering non digits in the zip field) * The inputs validate. (Try leaving them blank or entering non digits in the zip field)
* In your application you can simply read from or write to the model and the form will be updated. * In your application you can simply read from or write to the model and the form will be updated.

View file

@ -29,10 +29,10 @@
Take a look through the source and note: Take a look through the source and note:
* The script tag that {@link guide/bootstrap bootstraps} the angular environment. * The script tag that {@link guide/bootstrap bootstraps} the angular environment.
* The text {@link api/angular.module.ng.$compileProvider.directive.input input widget} which is * The text {@link api/ng.directive:input input form control} which is
bound to the greeting name text. bound to the greeting name text.
* No need for listener registration and event firing on change events. * No need for listener registration and event firing on change events.
* The implicit presence of the `name` variable which is in the root {@link api/angular.module.ng.$rootScope.Scope scope}. * The implicit presence of the `name` variable which is in the root {@link api/ng.$rootScope.Scope scope}.
* The double curly brace `{{markup}}`, which binds the name variable to the greeting text. * The double curly brace `{{markup}}`, which binds the name variable to the greeting text.
* The concept of {@link guide/dev_guide.templates.databinding data binding}, which reflects any * The concept of {@link guide/dev_guide.templates.databinding data binding}, which reflects any
changes to the changes to the

View file

@ -44,7 +44,7 @@ allowing you to send links to specific screens in your app.
# Services # Services
{@link api/angular.module.ng Services}: Services are long lived objects in your applications that are {@link api/ng Services}: Services are long lived objects in your applications that are
available across controllers. A collection of useful services are pre-bundled with angular but you available across controllers. A collection of useful services are pre-bundled with angular but you
will likely add your own. Services are initialized using dependency injection, which resolves the will likely add your own. Services are initialized using dependency injection, which resolves the
order of initialization. This safeguards you from the perils of global state (a common way to order of initialization. This safeguards you from the perils of global state (a common way to

View file

@ -125,4 +125,4 @@ board variable.
* The view can call any controller function. * The view can call any controller function.
* In this example, the `setUrl()` and `readUrl()` functions copy the game state to/from the URL's * In this example, the `setUrl()` and `readUrl()` functions copy the game state to/from the URL's
hash so the browser's back button will undo game steps. See deep-linking. This example calls {@link hash so the browser's back button will undo game steps. See deep-linking. This example calls {@link
api/angular.module.ng.$rootScope.Scope#$watch $watch()} to set up a listener that invokes `readUrl()` when needed. api/ng.$rootScope.Scope#$watch $watch()} to set up a listener that invokes `readUrl()` when needed.

View file

@ -49,14 +49,14 @@ initialization.
# Automatic Initialization # Automatic Initialization
Angular initializes automatically upon `DOMContentLoaded` event, at which point angular looks for Angular initializes automatically upon `DOMContentLoaded` event, at which point angular looks for
the {@link api/angular.module.ng.$compileProvider.directive.ngApp `ng-app`} directive which the {@link api/ng.directive:ngApp `ng-app`} directive which
designates your application root. If {@link designates your application root. If {@link
api/angular.module.ng.$compileProvider.directive.ngApp `ng-app`} directive is found then Angular api/ng.directive:ngApp `ng-app`} directive is found then Angular
will: will:
* load the {@link guide/module module} associated with the directive. * load the {@link guide/module module} associated with the directive.
* create the application {@link api/angular.module.AUTO.$injector injector} * create the application {@link api/AUTO.$injector injector}
* compile the DOM treating the {@link api/angular.module.ng.$compileProvider.directive.ngApp * compile the DOM treating the {@link api/ng.directive:ngApp
`ng-app`} directive as the root of the compilation. This allows you to tell it to treat only a `ng-app`} directive as the root of the compilation. This allows you to tell it to treat only a
portion of the DOM as an Angular application. portion of the DOM as an Angular application.
@ -82,7 +82,7 @@ or the need to perform an operation before the Angular compiles a page.
Here is an example of manually initializing Angular. The example is equivalent to using the {@link Here is an example of manually initializing Angular. The example is equivalent to using the {@link
api/angular.module.ng.$compileProvider.directive.ngApp ng-app} directive. api/ng.directive:ngApp ng-app} directive.
<pre> <pre>
<!doctype html> <!doctype html>

View file

@ -4,10 +4,10 @@
# Overview # Overview
Angular's {@link api/angular.module.ng.$compile HTML compiler} allows the developer to teach the Angular's {@link api/ng.$compile HTML compiler} allows the developer to teach the
browser new HTML syntax. The compiler allows you to attach behavior to any HTML element or attribute browser new HTML syntax. The compiler allows you to attach behavior to any HTML element or attribute
and even create new HTML element or attributes with custom behavior. Angular calls these behavior and even create new HTML element or attributes with custom behavior. Angular calls these behavior
extensions {@link api/angular.module.ng.$compileProvider.directive directives}. extensions {@link api/ng.$compileProvider.directive directives}.
HTML has a lot of constructs for formatting the HTML for static documents in declarative fashion. HTML has a lot of constructs for formatting the HTML for static documents in declarative fashion.
For example if something needs to be centered, there is no need to provide instructions to the For example if something needs to be centered, there is no need to provide instructions to the
@ -39,7 +39,7 @@ process happens into two phases.
scope model are reflected in the view, and any user interactions with the view are reflected scope model are reflected in the view, and any user interactions with the view are reflected
in the scope model. Making the scope model a single source of truth. in the scope model. Making the scope model a single source of truth.
Some directives such {@link api/angular.module.ng.$compileProvider.directive.ngRepeat Some directives such {@link api/ng.directive:ngRepeat
`ng-repeat`} clone DOM elements once for each item in collection. Having a compile and link phase `ng-repeat`} clone DOM elements once for each item in collection. Having a compile and link phase
improves performance since the cloned template only needs to be compiled once, and then linked improves performance since the cloned template only needs to be compiled once, and then linked
once for each clone instance. once for each clone instance.
@ -50,7 +50,7 @@ once for each clone instance.
Directive is a behavior which should be triggered when specific HTML constructs are encountered in Directive is a behavior which should be triggered when specific HTML constructs are encountered in
compilation process. The directives can be placed in element names, attributes, class names, as compilation process. The directives can be placed in element names, attributes, class names, as
well as comments. Here are some equivalent examples of invoking {@link well as comments. Here are some equivalent examples of invoking {@link
api/angular.module.ng.$compileProvider.directive.ngBind `ng-bind`} directive. api/ng.directive:ngBind `ng-bind`} directive.
<pre> <pre>
<span ng-bind="exp"></span> <span ng-bind="exp"></span>
@ -60,7 +60,7 @@ api/angular.module.ng.$compileProvider.directive.ngBind `ng-bind`} directive.
</pre> </pre>
Directive is just a function which executes when the compiler encounters it in the DOM. See {@link Directive is just a function which executes when the compiler encounters it in the DOM. See {@link
api/angular.module.ng.$compileProvider.directive directive API} for in depth documentation on how api/ng.$compileProvider.directive directive API} for in depth documentation on how
to write directives. to write directives.
Here is a directive which makes any element draggable. Notice the `draggable` attribute on the Here is a directive which makes any element draggable. Notice the `draggable` attribute on the

View file

@ -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. Returns the window.location.hash (without `#`) of the currently loaded page in the test frame.
## browser().location().url() ## browser().location().url()
Returns the {@link api/angular.module.ng.$location $location.url()} of the currently loaded page in Returns the {@link api/ng.$location $location.url()} of the currently loaded page in
the test frame. the test frame.
## browser().location().path() ## browser().location().path()
Returns the {@link api/angular.module.ng.$location $location.path()} of the currently loaded page in Returns the {@link api/ng.$location $location.path()} of the currently loaded page in
the test frame. the test frame.
## browser().location().search() ## browser().location().search()
Returns the {@link api/angular.module.ng.$location $location.search()} of the currently loaded page Returns the {@link api/ng.$location $location.search()} of the currently loaded page
in the test frame. in the test frame.
## browser().location().hash() ## browser().location().hash()
Returns the {@link api/angular.module.ng.$location $location.hash()} of the currently loaded page in Returns the {@link api/ng.$location $location.hash()} of the currently loaded page in
the test frame. the test frame.
## expect(future).{matcher} ## expect(future).{matcher}

View file

@ -4,7 +4,7 @@
In angular, a controller is a JavaScript function(type/class) that is used to augment instances of In angular, a controller is a JavaScript function(type/class) that is used to augment instances of
angular {@link scope Scope}, excluding the root scope. When you or angular create a new angular {@link scope Scope}, excluding the root scope. When you or angular create a new
child scope object via the {@link api/angular.module.ng.$rootScope.Scope#$new scope.$new} API , there is an child scope object via the {@link api/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 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. controller with the new scope and to augment its behavior.
@ -38,7 +38,7 @@ template/view. This behavior interacts with and modifies the application model.
As discussed in the {@link dev_guide.mvc.understanding_model Model} section of this guide, any As discussed in the {@link dev_guide.mvc.understanding_model Model} section of this guide, any
objects (or primitives) assigned to the scope become model properties. Any functions assigned to objects (or primitives) assigned to the scope become model properties. Any functions assigned to
the scope are available in the template/view, and can be invoked via angular expressions the scope are available in the template/view, and can be invoked via angular expressions
and `ng` event handler directives (e.g. {@link api/angular.module.ng.$compileProvider.directive.ngClick ngClick}). and `ng` event handler directives (e.g. {@link api/ng.directive:ngClick ngClick}).
# Using Controllers Correctly # Using Controllers Correctly
@ -68,9 +68,9 @@ instances).
# Associating Controllers with Angular Scope Objects # Associating Controllers with Angular Scope Objects
You can associate controllers with scope objects explicitly via the {@link api/angular.module.ng.$rootScope.Scope#$new You can associate controllers with scope objects explicitly via the {@link api/ng.$rootScope.Scope#$new
scope.$new} api or implicitly via the {@link api/angular.module.ng.$compileProvider.directive.ngController ngController scope.$new} api or implicitly via the {@link api/ng.directive:ngController ngController
directive} or {@link api/angular.module.ng.$route $route service}. directive} or {@link api/ng.$route $route service}.
## Controller Constructor and Methods Example ## Controller Constructor and Methods Example
@ -157,7 +157,7 @@ input box) in the second button.
## Controller Inheritance Example ## Controller Inheritance Example
Controller inheritance in angular is based on {@link api/angular.module.ng.$rootScope.Scope Scope} inheritance. Let's Controller inheritance in angular is based on {@link api/ng.$rootScope.Scope Scope} inheritance. Let's
have a look at an example: have a look at an example:
<pre> <pre>

View file

@ -30,7 +30,7 @@ occurs in controllers:
<button ng-click="{{foos='ball'}}">Click me</button> <button ng-click="{{foos='ball'}}">Click me</button>
* Use {@link api/angular.module.ng.$compileProvider.directive.ngInit ngInit directive} in templates (for toy/example apps * Use {@link api/ng.directive:ngInit ngInit directive} in templates (for toy/example apps
only, not recommended for real applications): only, not recommended for real applications):
<body ng-init=" foo = 'bar' "> <body ng-init=" foo = 'bar' ">
@ -45,7 +45,7 @@ when processing the following template constructs:
The code above creates a model called "query" on the current scope with the value set to "fluffy The code above creates a model called "query" on the current scope with the value set to "fluffy
cloud". cloud".
* An iterator declaration in {@link api/angular.module.ng.$compileProvider.directive.ngRepeat ngRepeater}: * An iterator declaration in {@link api/ng.directive:ngRepeat ngRepeater}:
<p ng-repeat="phone in phones"></p> <p ng-repeat="phone in phones"></p>

View file

@ -9,8 +9,8 @@ the DOM based on information in the template, controller and model.
In the angular implementation of MVC, the view has knowledge of both the model and the controller. In the angular implementation of MVC, the view has knowledge of both the model and the controller.
The view knows about the model where two-way data-binding occurs. The view has knowledge of the The view knows about the model where two-way data-binding occurs. The view has knowledge of the
controller through angular directives, such as {@link api/angular.module.ng.$compileProvider.directive.ngController controller through angular directives, such as {@link api/ng.directive:ngController
ngController} and {@link api/angular.module.ng.$compileProvider.directive.ngView ngView}, and through bindings of this form: ngController} and {@link api/ng.directive:ngView ngView}, and through bindings of this form:
`{{someControllerFunction()}}`. In these ways, the view can call functions in an associated `{{someControllerFunction()}}`. In these ways, the view can call functions in an associated
controller function. controller function.

View file

@ -89,7 +89,7 @@ setter methods that allow you to get or change the current URL in the browser.
## $location service configuration ## $location service configuration
To configure the `$location` service, retrieve the To configure the `$location` service, retrieve the
{@link api/angular.module.ng.$locationProvider $locationProvider} and set the parameters as follows: {@link api/ng.$locationProvider $locationProvider} and set the parameters as follows:
- **html5Mode(mode)**: {boolean}<br /> - **html5Mode(mode)**: {boolean}<br />
@ -134,7 +134,7 @@ current URL without creating a new browser history record you can call:
</pre> </pre>
Note that the setters don't update `window.location` immediately. Instead, `$location` service is Note that the setters don't update `window.location` immediately. Instead, `$location` service is
aware of the {@link api/angular.module.ng.$rootScope.Scope scope} life-cycle and coalesces multiple `$location` aware of the {@link api/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 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 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 enough to call the `replace()` method just once to make the entire "commit" a replace operation
@ -489,11 +489,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 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 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.module.ng.$window $window.location.href}. use a lower level API, {@link api/ng.$window $window.location.href}.
## Using $location outside of the scope life-cycle ## Using $location outside of the scope life-cycle
`$location` knows about Angular's {@link api/angular.module.ng.$rootScope.Scope scope} life-cycle. When a URL changes in `$location` knows about Angular's {@link api/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 the browser it updates the `$location` and calls `$apply` so that all $watchers / $observers are
notified. notified.
When you change the `$location` inside the `$digest` phase everything is ok; `$location` will When you change the `$location` inside the `$digest` phase everything is ok; `$location` will
@ -513,7 +513,7 @@ hashPrefix.
# Testing with the $location service # Testing with the $location service
When using `$location` service during testing, you are outside of the angular's {@link When using `$location` service during testing, you are outside of the angular's {@link
api/angular.module.ng.$rootScope.Scope scope} life-cycle. This means it's your responsibility to call `scope.$apply()`. api/ng.$rootScope.Scope scope} life-cycle. This means it's your responsibility to call `scope.$apply()`.
<pre> <pre>
describe('serviceUnderTest', function() { describe('serviceUnderTest', function() {
@ -612,7 +612,7 @@ then uses the information it obtains to compose hashbang URLs (such as
The Angular's compiler currently does not support two-way binding for methods (see {@link The Angular's compiler currently does not support two-way binding for methods (see {@link
https://github.com/angular/angular.js/issues/404 issue}). If you should require two-way binding https://github.com/angular/angular.js/issues/404 issue}). If you should require two-way binding
to the $location object (using {@link api/angular.module.ng.$compileProvider.directive.input.text to the $location object (using {@link api/ng.directive:input.text
ngModel} directive on an input field), you will need to specify an extra model property ngModel} directive on an input field), you will need to specify an extra model property
(e.g. `locationPath`) with two watchers which push $location updates in both directions. For (e.g. `locationPath`) with two watchers which push $location updates in both directions. For
example: example:
@ -634,7 +634,7 @@ $scope.$watch('$location.path()', function(path) {
# Related API # Related API
* {@link api/angular.module.ng.$location $location API} * {@link api/ng.$location $location API}

View file

@ -5,7 +5,7 @@
While angular offers several useful services, for any nontrivial application you'll find it useful While angular offers several useful services, for any nontrivial application you'll find it useful
to write your own custom services. To do this you begin by registering a service factory function to write your own custom services. To do this you begin by registering a service factory function
with a module either via the {@link api/angular.module Module#factory api} or directly 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. via the {@link api/AUTO.$provide $provide} api inside of module config function.
All angular services participate in {@link 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 themselves with Angular's DI system (injector) under a `name` (id) as well as by declaring
@ -18,7 +18,7 @@ testable.
To register a service, you must have a module that this service will be part of. Afterwards, you To register a service, you must have a module that this service will be part of. Afterwards, you
can register the service with the module either via the {@link api/angular.Module Module api} or can register the service with the module either via the {@link api/angular.Module Module api} or
by using the {@link api/angular.module.AUTO.$provide $provide} service in the module configuration by using the {@link api/AUTO.$provide $provide} service in the module configuration
function.The following pseudo-code shows both approaches: function.The following pseudo-code shows both approaches:
Using the angular.Module api: Using the angular.Module api:
@ -101,4 +101,4 @@ important.
## Related API ## Related API
* {@link api/angular.module.ng Angular Service API} * {@link api/ng Angular Service API}

View file

@ -115,4 +115,4 @@ dependencies with the `$inject` property.
## Related API ## Related API
{@link api/angular.module.ng Angular Service API} {@link api/ng Angular Service API}

View file

@ -88,10 +88,10 @@ provided by Angular's web framework:
Things to notice in this example: Things to notice in this example:
* The `batchLog` service depends on the built-in {@link api/angular.module.ng.$defer $defer} and * The `batchLog` service depends on the built-in {@link api/ng.$defer $defer} and
{@link api/angular.module.ng.$log $log} services, and allows messages to be logged into the {@link api/ng.$log $log} services, and allows messages to be logged into the
`console.log` in batches. `console.log` in batches.
* The `routeTemplateMonitor` service depends on the built-in {@link api/angular.module.ng.$route * The `routeTemplateMonitor` service depends on the built-in {@link api/ng.$route
$route} service as well as our custom `batchLog` service. $route} service as well as our custom `batchLog` service.
* Both of our services use the factory function signature and array notation for inject annotations * Both of our services use the factory function signature and array notation for inject annotations
to declare their dependencies. It is important that the order of the string identifiers in the array to declare their dependencies. It is important that the order of the string identifiers in the array
@ -110,5 +110,5 @@ that the injector uses to determine which services and in which order to inject.
## Related API ## Related API
* {@link api/angular.module.ng Angular Service API} * {@link api/ng Angular Service API}
* {@link api/angular.injector Angular Injector API} * {@link api/angular.injector Angular Injector API}

View file

@ -18,4 +18,4 @@ most often used with {@link di dependency injection}, also a key feature of angu
## Related API ## Related API
* {@link api/angular.module.ng Angular Service API} * {@link api/ng Angular Service API}

View file

@ -59,4 +59,4 @@ it('should clear messages after alert', function() {
## Related API ## Related API
* {@link api/angular.module.ng Angular Service API} * {@link api/ng Angular Service API}

View file

@ -3,7 +3,7 @@
@description @description
Angular services are singletons that carry out specific tasks common to web apps, such as the Angular services are singletons that carry out specific tasks common to web apps, such as the
{@link api/angular.module.ng.$http $http service} that provides low level access to the browser's {@link api/ng.$http $http service} that provides low level access to the browser's
`XMLHttpRequest` object. `XMLHttpRequest` object.
To use an angular service, you identify it as a dependency for the dependent (a controller, or To use an angular service, you identify it as a dependency for the dependent (a controller, or
@ -32,5 +32,5 @@ above). You can also create your own custom services.
## Related API ## Related API
* {@link api/angular.module.ng Angular Service API} * {@link api/ng Angular Service API}
* {@link api/angular.injector Injector API} * {@link api/angular.injector Injector API}

View file

@ -9,10 +9,10 @@ Angular sets these CSS classes. It is up to your application to provide useful s
* `ng-invalid`, `ng-valid` * `ng-invalid`, `ng-valid`
- **Usage:** angular applies this class to an input widget element if that element's input does - **Usage:** angular applies this class to an input widget element if that element's input does
notpass validation. (see {@link api/angular.module.ng.$compileProvider.directive.input input} directive). notpass validation. (see {@link api/ng.directive:input input} directive).
* `ng-pristine`, `ng-dirty` * `ng-pristine`, `ng-dirty`
- **Usage:** angular {@link api/angular.module.ng.$compileProvider.directive.input input} directive applies `ng-pristine` class - **Usage:** angular {@link api/ng.directive:input input} directive applies `ng-pristine` class
to a new input widget element which did not have user interaction. Once the user interacts with to a new input widget element which did not have user interaction. Once the user interacts with
the input widget the class is changed to `ng-dirty`. the input widget the class is changed to `ng-dirty`.

View file

@ -57,4 +57,4 @@ text upper-case and assigns color.
## Related API ## Related API
* {@link api/angular.module.ng.$filter Angular Filter API} * {@link api/ng.$filter Angular Filter API}

View file

@ -12,7 +12,7 @@ displaying it to the user. You can pass expressions through a chain of filters l
name | uppercase name | uppercase
The expression evaluator simply passes the value of name to The expression evaluator simply passes the value of name to
{@link api/angular.module.ng.$filter.uppercase uppercase filter}. {@link api/ng.filter:uppercase uppercase filter}.
In addition to formatting data, filters can also modify the DOM. This allows filters to handle 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. tasks such as conditionally applying CSS styles to filtered output.
@ -25,4 +25,4 @@ tasks such as conditionally applying CSS styles to filtered output.
## Related API ## Related API
* {@link api/angular.module.ng.$filter Angular Filter API} * {@link api/ng.$filter Angular Filter API}

View file

@ -2,7 +2,7 @@
@name Developer Guide: Templates: Filters: Using Angular Filters @name Developer Guide: Templates: Filters: Using Angular Filters
@description @description
Filters can be part of any {@link api/angular.module.ng.$rootScope.Scope} evaluation but are typically used to format Filters can be part of any {@link api/ng.$rootScope.Scope} evaluation but are typically used to format
expressions in bindings in your templates: expressions in bindings in your templates:
{{ expression | filter }} {{ expression | filter }}
@ -37,4 +37,4 @@ argument that specifies how many digits to display to the right of the decimal p
## Related API ## Related API
* {@link api/angular.module.ng.$filter Angular Filter API} * {@link api/ng.$filter Angular Filter API}

View file

@ -12,7 +12,7 @@ These are the types of angular elements and element attributes you can use in a
* {@link guide/directive Directive} — An attribute or element that * {@link guide/directive Directive} — An attribute or element that
augments an existing DOM element or represents a reusable DOM component - a widget. augments an existing DOM element or represents a reusable DOM component - a widget.
* {@link api/angular.module.ng.$interpolate Markup} — The double * {@link api/ng.$interpolate Markup} — The double
curly brace notation `{{ }}` to bind expressions to elements is built-in angular markup. curly brace notation `{{ }}` to bind expressions to elements is built-in angular markup.
* {@link dev_guide.templates.filters Filter} — Formats your data for display to the user. * {@link dev_guide.templates.filters Filter} — Formats your data for display to the user.
* {@link forms Form controls} — Lets you validate user input. * {@link forms Form controls} — Lets you validate user input.
@ -41,8 +41,8 @@ with {@link expression expressions}:
In a simple single-page app, the template consists of HTML, CSS, and angular directives contained 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 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 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.module.ng.$route files. You "include" the partials in the main page using the {@link api/ng.$route
$route} service in conjunction with the {@link api/angular.module.ng.$compileProvider.directive.ngView ngView} directive. An $route} service in conjunction with the {@link api/ng.directive:ngView ngView} directive. An
example of this technique is shown in the {@link tutorial/ angular tutorial}, in steps seven and example of this technique is shown in the {@link tutorial/ angular tutorial}, in steps seven and
eight. eight.

View file

@ -247,7 +247,7 @@ that such a test tells a story, rather then asserting random bits which don't se
## Filters ## Filters
{@link api/angular.module.ng.$filter Filters} are functions which transform the data into user readable {@link api/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 format. They are important because they remove the formatting responsibility from the application
logic, further simplifying the application logic. logic, further simplifying the application logic.

View file

@ -55,11 +55,11 @@ the following example.
# String interpolation # String interpolation
During the compilation process the {@link api/angular.module.ng.$compile compiler} matches text and During the compilation process the {@link api/ng.$compile compiler} matches text and
attributes using the {@link api/angular.module.ng.$interpolate $interpolate} service to see if they attributes using the {@link api/ng.$interpolate $interpolate} service to see if they
contain embedded expressions. These expressions are registered as {@link contain embedded expressions. These expressions are registered as {@link
api/angular.module.ng.$rootScope.Scope#$watch watches} and will update as part of normal {@link api/ng.$rootScope.Scope#$watch watches} and will update as part of normal {@link
api/angular.module.ng.$rootScope.Scope#$digest digest} cycle. An example of interpolation is shown api/ng.$rootScope.Scope#$digest digest} cycle. An example of interpolation is shown
here: here:
<pre> <pre>
@ -74,21 +74,21 @@ Compilation of HTML happens in three phases:
realize because the templates must be parsable HTML. This is in contrast to most templating realize because the templates must be parsable HTML. This is in contrast to most templating
systems that operate on strings, rather then on DOM elements. systems that operate on strings, rather then on DOM elements.
2. The compilation of the DOM is performed by the call to {@link api/angular.module.ng.$compile 2. The compilation of the DOM is performed by the call to {@link api/ng.$compile
$compile()} method. The method traverses the DOM and matches the directives. If a match is found $compile()} method. The method traverses the DOM and matches the directives. If a match is found
it is added to the list of directives associated with the given DOM element. Once all directives it is added to the list of directives associated with the given DOM element. Once all directives
for a given DOM element have been identified they are sorted by priority and their `compile()` for a given DOM element have been identified they are sorted by priority and their `compile()`
functions are executed. The directive compile function has a chance to modify the DOM structure functions are executed. The directive compile function has a chance to modify the DOM structure
and is responsible for producing a `link()` function explained next. The {@link and is responsible for producing a `link()` function explained next. The {@link
api/angular.module.ng.$compile $compile()} method returns a combined linking function, which is a api/ng.$compile $compile()} method returns a combined linking function, which is a
collection of all of the linking functions returned from the individual directive compile collection of all of the linking functions returned from the individual directive compile
functions. functions.
3. Link the template with scope by calling the linking function returned from the previous step. 3. Link the template with scope by calling the linking function returned from the previous step.
This in turn will call the linking function of the individual directives allowing them to This in turn will call the linking function of the individual directives allowing them to
register any listeners on the elements and set up any {@link register any listeners on the elements and set up any {@link
api/angular.module.ng.$rootScope.Scope#$watch watches} with the {@link api/ng.$rootScope.Scope#$watch watches} with the {@link
api/angular.module.ng.$rootScope.Scope scope}. The result of this is a live binding between the api/ng.$rootScope.Scope scope}. The result of this is a live binding between the
scope and the DOM. A change in the scope is reflected in the DOM. scope and the DOM. A change in the scope is reflected in the DOM.
<pre> <pre>
@ -125,14 +125,14 @@ The short answer is that compile and link separation is needed any time a change
a change in DOM structure such as in repeaters. a change in DOM structure such as in repeaters.
When the above example is compiled, the compiler visits every node and looks for directives. The When the above example is compiled, the compiler visits every node and looks for directives. The
`{{user}}` is an example of {@link api/angular.module.ng.$interpolate interpolation} directive. {@link `{{user}}` is an example of {@link api/ng.$interpolate interpolation} directive. {@link
api/angular.module.ng.$compileProvider.directive.ngRepeat ngRepeat} is another directive. But {@link api/ng.directive:ngRepeat ngRepeat} is another directive. But {@link
api/angular.module.ng.$compileProvider.directive.ngRepeat ngRepeat} has a dilemma. It needs to be api/ng.directive:ngRepeat ngRepeat} has a dilemma. It needs to be
able to quickly stamp out new `li`s for every `action` in `user.actions`. This means that it needs able to quickly stamp out new `li`s for every `action` in `user.actions`. This means that it needs
to save a clean copy of the `li` element for cloning purposes and as new `action`s are inserted, to save a clean copy of the `li` element for cloning purposes and as new `action`s are inserted,
the template `li` element needs to be cloned and inserted into `ul`. But cloning the `li` element the template `li` element needs to be cloned and inserted into `ul`. But cloning the `li` element
is not enough. It also needs to compile the `li` so that its directives such as is not enough. It also needs to compile the `li` so that its directives such as
`{{action.descriptions}}` evaluate against the right {@link api/angular.module.ng.$rootScope.Scope `{{action.descriptions}}` evaluate against the right {@link api/ng.$rootScope.Scope
scope}. A naive method would be to simply insert a copy of the `li` element and then compile it. scope}. A naive method would be to simply insert a copy of the `li` element and then compile it.
But compiling on every `li` element clone would be slow, since the compilation requires that we But compiling on every `li` element clone would be slow, since the compilation requires that we
traverse the DOM tree and look for directives and execute them. If we put the compilation inside a traverse the DOM tree and look for directives and execute them. If we put the compilation inside a
@ -140,17 +140,17 @@ repeater which needs to unroll 100 items we would quickly run into performance p
The solution is to break the compilation process into two phases the compile phase where all of The solution is to break the compilation process into two phases the compile phase where all of
the directives are identified and sorted by priority, and a linking phase where any work which the directives are identified and sorted by priority, and a linking phase where any work which
links a specific instance of the {@link api/angular.module.ng.$rootScope.Scope scope} and the specific links a specific instance of the {@link api/ng.$rootScope.Scope scope} and the specific
instance of an `li` is performed. instance of an `li` is performed.
{@link api/angular.module.ng.$compileProvider.directive.ngRepeat ngRepeat} works by preventing the {@link api/ng.directive:ngRepeat ngRepeat} works by preventing the
compilation process form descending into `li` element. Instead the {@link compilation process form descending into `li` element. Instead the {@link
api/angular.module.ng.$compileProvider.directive.ngRepeat ngRepeat} directive compiles `li` api/ng.directive:ngRepeat ngRepeat} directive compiles `li`
seperatly. The result of of the `li` element compilation is a linking function which contains all seperatly. The result of of the `li` element compilation is a linking function which contains all
of the directives contained in the `li` element ready to be attached to a specific clone of `li` of the directives contained in the `li` element ready to be attached to a specific clone of `li`
element. At runtime the {@link api/angular.module.ng.$compileProvider.directive.ngRepeat ngRepeat} element. At runtime the {@link api/ng.directive:ngRepeat ngRepeat}
watches the expression and as items are added to the array it clones the `li` element, creates a watches the expression and as items are added to the array it clones the `li` element, creates a
new {@link api/angular.module.ng.$rootScope.Scope scope} for the cloned `li` element and calls the new {@link api/ng.$rootScope.Scope scope} for the cloned `li` element and calls the
link function on the cloned `li`. link function on the cloned `li`.
Summary: Summary:
@ -288,14 +288,14 @@ further simplification:
## Factory method ## Factory method
The factory method is responsible for creating the directive. It is invoked only once, when the The factory method is responsible for creating the directive. It is invoked only once, when the
{@link api/angular.module.ng.$compile compiler} matches the directive for the first time. You can {@link api/ng.$compile compiler} matches the directive for the first time. You can
perform any initialization work here. The method is invoked using the {@link perform any initialization work here. The method is invoked using the {@link
http://localhost:8000/build/docs/api/angular.module.AUTO.$injector#invoke $injector.invoke} which http://localhost:8000/build/docs/api/AUTO.$injector#invoke $injector.invoke} which
makes it injectable following all of the rules of injection annotation. makes it injectable following all of the rules of injection annotation.
## Directive Definition Object ## Directive Definition Object
The directive definition object provides instructions to the {@link api/angular.module.ng.$compile The directive definition object provides instructions to the {@link api/ng.$compile
compiler}. The attributes are: compiler}. The attributes are:
* `name` - Name of the current scope. Optional defaults to the name at registration. * `name` - Name of the current scope. Optional defaults to the name at registration.
@ -387,7 +387,7 @@ compiler}. The attributes are:
append the template to the element. append the template to the element.
* `transclude` - compile the content of the element and make it available to the directive. * `transclude` - compile the content of the element and make it available to the directive.
Typically used with {@link api/angular.module.ng.$compileProvider.directive.ngTransclude Typically used with {@link api/ng.directive:ngTransclude
ngTransclude}. The advantage of transclusion is that the linking function receives a ngTransclude}. The advantage of transclusion is that the linking function receives a
transclusion function which is pre-bound to the correct scope. In a typical setup the widget transclusion function which is pre-bound to the correct scope. In a typical setup the widget
creates an `isolate` scope, but the transclusion is not a child, but a sibling of the `isolate` creates an `isolate` scope, but the transclusion is not a child, but a sibling of the `isolate`
@ -412,8 +412,8 @@ compiler}. The attributes are:
Compile function deals with transforming the template DOM. Since most directives do not do Compile function deals with transforming the template DOM. Since most directives do not do
template transformation, it is not used often. Examples which require compile functions are template transformation, it is not used often. Examples which require compile functions are
directives which transform template DOM such as {@link directives which transform template DOM such as {@link
api/angular.module.ng.$compileProvider.directive.ngRepeat ngRepeat} or load the contents api/ng.directive:ngRepeat ngRepeat} or load the contents
asynchronously such as {@link api/angular.module.ng.$compileProvider.directive.ngView ngView}. The asynchronously such as {@link api/ng.directive:ngView ngView}. The
compile functions takes the following arguments. compile functions takes the following arguments.
* `tElement` - template element - The element where the directive has been declared. It is * `tElement` - template element - The element where the directive has been declared. It is
@ -450,8 +450,8 @@ Link function is responsible for registering DOM listeners as well as updating t
executed after the template has been cloned. This is where most of the directive logic will be executed after the template has been cloned. This is where most of the directive logic will be
put. put.
* `scope` - {@link api/angular.module.ng.$rootScope.Scope Scope} - The scope to be used by the * `scope` - {@link api/ng.$rootScope.Scope Scope} - The scope to be used by the
directive for registering {@link api/angular.module.ng.$rootScope.Scope#$watch watches}. directive for registering {@link api/ng.$rootScope.Scope#$watch watches}.
* `iElement` - instance element - The element where the directive is to be used. It is safe to * `iElement` - instance element - The element where the directive is to be used. It is safe to
manipulate the children of the element only in `postLink` function since the children have manipulate the children of the element only in `postLink` function since the children have

View file

@ -3,7 +3,7 @@
@description @description
Expressions are JavaScript-like code snippets that are usually placed in bindings such as `{{ Expressions are JavaScript-like code snippets that are usually placed in bindings such as `{{
expression }}`. Expressions are process by the {@link api/angular.module.ng.$parse $parse} expression }}`. Expressions are process by the {@link api/ng.$parse $parse}
service. service.
For example, these are all valid expressions in angular: For example, these are all valid expressions in angular:
@ -35,7 +35,7 @@ differences:
If, on the other hand, you do want to run arbitrary JavaScript code, you should make it a If, on the other hand, you do want to run arbitrary JavaScript code, you should make it a
controller method and call the method. If you want to `eval()` an angular expression from controller method and call the method. If you want to `eval()` an angular expression from
JavaScript, use the {@link api/angular.module.ng.$rootScope.Scope#$eval `$eval()`} method. JavaScript, use the {@link api/ng.$rootScope.Scope#$eval `$eval()`} method.
## Example ## Example
<doc:example> <doc:example>
@ -92,7 +92,7 @@ You can try evaluating different expressions here:
# Property Evaluation # Property Evaluation
Evaluation of all properties takes place against a scope. Unlike JavaScript, where names default Evaluation of all properties takes place against a scope. Unlike JavaScript, where names default
to global window properties, angular expressions have to use {@link api/angular.module.ng.$window to global window properties, angular expressions have to use {@link api/ng.$window
`$window`} to refer to the global `window` object. For example, if you want to call `alert()`, which is `$window`} to refer to the global `window` object. For example, if you want to call `alert()`, which is
defined on `window`, in an expression must use `$window.alert()`. This is done intentionally to defined on `window`, in an expression must use `$window.alert()`. This is done intentionally to
prevent accidental access to the global state (a common source of subtle bugs). prevent accidental access to the global state (a common source of subtle bugs).
@ -162,7 +162,7 @@ of filters like this:
name | uppercase name | uppercase
The expression evaluator simply passes the value of name to {@link The expression evaluator simply passes the value of name to {@link
api/angular.module.ng.$filter.uppercase `uppercase`} filter. api/ng.filter:uppercase `uppercase`} filter.
Chain filters using this syntax: Chain filters using this syntax:

View file

@ -12,9 +12,9 @@ Server-side validation is still necessary for a secure application.
# Simple form # Simple form
The key directive in understanding two-way data-binding is {@link api/angular.module.ng.$compileProvider.directive.ngModel ngModel}. The key directive in understanding two-way data-binding is {@link api/ng.directive:ngModel ngModel}.
The `ngModel` directive provides the two-way data-binding by synchronizing the model to the view, as well as view to the model. The `ngModel` directive provides the two-way data-binding by synchronizing the model to the view, as well as view to the model.
In addition it provides {@link api/angular.module.ng.$compileProvider.directive.ngModel.NgModelController API} for other directives to augment its behavior. In addition it provides {@link api/ng.directive:ngModel.NgModelController API} for other directives to augment its behavior.
<doc:example> <doc:example>
<doc:source> <doc:source>
@ -113,9 +113,9 @@ This ensures that the user is not distracted with an error until after interacti
# Binding to form and control state # Binding to form and control state
A form is in instance of {@link api/angular.module.ng.$compileProvider.directive.form.FormController FormController}. A form is in instance of {@link api/ng.directive:form.FormController FormController}.
The form instance can optionally be published into the scope using the `name` attribute. The form instance can optionally be published into the scope using the `name` attribute.
Similarly control is an instance of {@link api/angular.module.ng.$compileProvider.directive.ngModel.NgModelController NgModelController}. Similarly control is an instance of {@link api/ng.directive:ngModel.NgModelController NgModelController}.
The control instance can similarly be published into the form instance using the `name` attribute. The control instance can similarly be published into the form instance using the `name` attribute.
This implies that the internal state of both the form and the control is available for binding in the view using the standard binding primitives. This implies that the internal state of both the form and the control is available for binding in the view using the standard binding primitives.
@ -178,19 +178,19 @@ This allows us to extend the above example with these features:
# Custom Validation # Custom Validation
Angular provides basic implementation for most common html5 {@link api/angular.module.ng.$compileProvider.directive.input input} Angular provides basic implementation for most common html5 {@link api/ng.directive:input input}
types: ({@link api/angular.module.ng.$compileProvider.directive.input.text text}, {@link api/angular.module.ng.$compileProvider.directive.input.number number}, {@link api/angular.module.ng.$compileProvider.directive.input.url url}, {@link api/angular.module.ng.$compileProvider.directive.input.email email}, {@link api/angular.module.ng.$compileProvider.directive.input.radio radio}, {@link api/angular.module.ng.$compileProvider.directive.input.checkbox checkbox}), as well as some directives for validation (`required`, `pattern`, `minlength`, `maxlength`, `min`, `max`). types: ({@link api/ng.directive:input.text text}, {@link api/ng.directive:input.number number}, {@link api/ng.directive:input.url url}, {@link api/ng.directive:input.email email}, {@link api/ng.directive:input.radio radio}, {@link api/ng.directive:input.checkbox checkbox}), as well as some directives for validation (`required`, `pattern`, `minlength`, `maxlength`, `min`, `max`).
Defining your own validator can be done by defining your own directive which adds a custom validation function to the `ngModel` {@link api/angular.module.ng.$compileProvider.directive.ngModel.NgModelController controller}. Defining your own validator can be done by defining your own directive which adds a custom validation function to the `ngModel` {@link api/ng.directive:ngModel.NgModelController controller}.
To get a hold of the controller the directive specifies a dependency as shown in the example below. To get a hold of the controller the directive specifies a dependency as shown in the example below.
The validation can occur in two places: The validation can occur in two places:
* **Model to View update** - * **Model to View update** -
Whenever the bound model changes, all functions in {@link api/angular.module.ng.$compileProvider.directive.ngModel.NgModelController#$formatters NgModelController#$formatters} array are pipe-lined, so that each of these functions has an opportunity to format the value and change validity state of the form control through {@link api/angular.module.ng.$compileProvider.directive.ngModel.NgModelController#$setValidity NgModelController#$setValidity}. Whenever the bound model changes, all functions in {@link api/ng.directive:ngModel.NgModelController#$formatters NgModelController#$formatters} array are pipe-lined, so that each of these functions has an opportunity to format the value and change validity state of the form control through {@link api/ng.directive:ngModel.NgModelController#$setValidity NgModelController#$setValidity}.
* **View to Model update** - * **View to Model update** -
In a similar way, whenever a user interacts with a control, the controll calls {@link api/angular.module.ng.$compileProvider.directive.ngModel.NgModelController#$setViewValue NgModelController#$setViewValue}. In a similar way, whenever a user interacts with a control, the controll calls {@link api/ng.directive:ngModel.NgModelController#$setViewValue NgModelController#$setViewValue}.
This in turn pipelines all functions in {@link api/angular.module.ng.$compileProvider.directive.ngModel.NgModelController#$parsers NgModelController#$parsers} array, so that each of these functions has an opportunity to convert the value and change validity state of the form control through {@link api/angular.module.ng.$compileProvider.directive.ngModel.NgModelController#$setValidity NgModelController#$setValidity}. This in turn pipelines all functions in {@link api/ng.directive:ngModel.NgModelController#$parsers NgModelController#$parsers} array, so that each of these functions has an opportunity to convert the value and change validity state of the form control through {@link api/ng.directive:ngModel.NgModelController#$setValidity NgModelController#$setValidity}.
In the following example we create two directives. In the following example we create two directives.
@ -273,12 +273,12 @@ In the following example we create two directives.
# Implementing custom form control (using `ngModel`) # Implementing custom form control (using `ngModel`)
Angular implements all of the basic HTML form controls ({@link api/angular.module.ng.$compileProvider.directive.input input}, {@link api/angular.module.ng.$compileProvider.directive.select select}, {@link api/angular.module.ng.$compileProvider.directive.textarea textarea}), which should be sufficient for most cases. Angular implements all of the basic HTML form controls ({@link api/ng.directive:input input}, {@link api/ng.directive:select select}, {@link api/ng.directive:textarea textarea}), which should be sufficient for most cases.
However, if you need more flexibility, you can write your own form control as a directive. However, if you need more flexibility, you can write your own form control as a directive.
In order for custom control to work with `ngModel` and to achieve two-way data-binding it needs to: In order for custom control to work with `ngModel` and to achieve two-way data-binding it needs to:
- implement `render` method, which is responsible for rendering the data after it passed the {@link api/angular.module.ng.$compileProvider.directive.ngModel.NgModelController#$formatters NgModelController#$formatters}, - implement `render` method, which is responsible for rendering the data after it passed the {@link api/ng.directive:ngModel.NgModelController#$formatters NgModelController#$formatters},
- call `$setViewValue` method, whenever the user interacts with the control and model needs to be updated. This is usually done inside a DOM Event listener. - call `$setViewValue` method, whenever the user interacts with the control and model needs to be updated. This is usually done inside a DOM Event listener.
See {@link guide/directive $compileProvider.directive} for more info. See {@link guide/directive $compileProvider.directive} for more info.

View file

@ -17,15 +17,15 @@ abstracted bits.
**What level of support for i18n/l10n is currently in Angular?** **What level of support for i18n/l10n is currently in Angular?**
Currently, Angular supports i18n/l10n for {@link Currently, Angular supports i18n/l10n for {@link
http://docs.angularjs.org/#!/api/angular.module.ng.$filter.date datetime}, {@link http://docs.angularjs.org/#!/api/ng.filter:date datetime}, {@link
http://docs.angularjs.org/#!/api/angular.module.ng.$filter.number number} and {@link http://docs.angularjs.org/#!/api/ng.filter:number number} and {@link
http://docs.angularjs.org/#!/api/angular.module.ng.$filter.currency currency} filters. http://docs.angularjs.org/#!/api/ng.filter:currency currency} filters.
Additionally, Angular supports localizable pluralization support provided by the {@link Additionally, Angular supports localizable pluralization support provided by the {@link
api/angular.module.ng.$compileProvider.directive.ngPluralize ngPluralize directive}. api/ng.directive:ngPluralize ngPluralize directive}.
All localizable Angular components depend on locale-specific rule sets managed by the {@link All localizable Angular components depend on locale-specific rule sets managed by the {@link
api/angular.module.ng.$locale $locale service}. api/ng.$locale $locale service}.
For readers who want to jump straight into examples, we have a few web pages that showcase how to 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 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"** **Currency symbol "gotcha"**
Angular's {@link http://docs.angularjs.org/#!/api/angular.module.ng.$filter.currency currency filter} allows Angular's {@link http://docs.angularjs.org/#!/api/ng.filter:currency currency filter} allows
you to use the default currency symbol from the {@link api/angular.module.ng.$locale locale service}, you to use the default currency symbol from the {@link api/ng.$locale locale service},
or you can provide the filter with a custom currency symbol. If your app will be used only in one 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 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 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. will really upset your client.
In this case, you need to override the default currency symbol by providing the {@link In this case, you need to override the default currency symbol by providing the {@link
http://docs.angularjs.org/#!/api/angular.module.ng.$filter.currency currency filter} with a currency symbol as http://docs.angularjs.org/#!/api/ng.filter:currency currency filter} with a currency symbol as
a parameter when you configure the filter, for example, {{ 1000 | currency:"USD$"}}. This way, 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. Angular will always show a balance of 'USD$1000' and disregard any locale changes.

View file

@ -132,7 +132,7 @@ These input widgets look normal enough, but consider these points:
* When this page loaded, angular bound the names of the input widgets (`qty` and `cost`) to * When this page loaded, angular bound the names of the input widgets (`qty` and `cost`) to
variables of the same name. Think of those variables as the "Model" component of the variables of the same name. Think of those variables as the "Model" component of the
Model-View-Controller design pattern. Model-View-Controller design pattern.
* Note that the HTML widget {@link api/angular.module.ng.$compileProvider.directive.input input} * Note that the HTML widget {@link api/ng.directive:input input}
has special powers. The input invalidates itself by turning red when you enter invalid data or has special powers. The input invalidates itself by turning red when you enter invalid data or
leave the the input fields blank. These new widget behavior make it easier to implement field leave the the input fields blank. These new widget behavior make it easier to implement field
validation common in CRUD applications. validation common in CRUD applications.

View file

@ -4,17 +4,17 @@
# What are Scopes? # What are Scopes?
{@link api/angular.module.ng.$rootScope.Scope scope} is an object that refers to the application {@link api/ng.$rootScope.Scope scope} is an object that refers to the application
model. It is an execution context for {@link expression expressions}. Scopes are model. It is an execution context for {@link expression expressions}. Scopes are
arranged in hierarchical structure which mimic the DOM structure of the application. Scopes can arranged in hierarchical structure which mimic the DOM structure of the application. Scopes can
watch {@link guide/expression expressions} and propagate events. watch {@link guide/expression expressions} and propagate events.
## Scope characteristics ## Scope characteristics
- Scopes provide APIs ({@link api/angular.module.ng.$rootScope.Scope#$watch $watch}) to observe - Scopes provide APIs ({@link api/ng.$rootScope.Scope#$watch $watch}) to observe
model mutations. model mutations.
- Scopes provide APIs ({@link api/angular.module.ng.$rootScope.Scope#$apply $apply}) to - Scopes provide APIs ({@link api/ng.$rootScope.Scope#$apply $apply}) to
propagate any model changes through the system into the view from outside of the "Angular propagate any model changes through the system into the view from outside of the "Angular
realm" (controllers, services, Angular event handlers). realm" (controllers, services, Angular event handlers).
@ -28,8 +28,8 @@ watch {@link guide/expression expressions} and propagate events.
## Scope as Data-Model ## Scope as Data-Model
Scope is the glue between application controller and the view. During the template {@link compiler Scope is the glue between application controller and the view. During the template {@link compiler
linking} phase the {@link api/angular.module.ng.$compileProvider.directive directives} set up linking} phase the {@link api/ng.$compileProvider.directive directives} set up
{@link api/angular.module.ng.$rootScope.Scope#$watch `$watch`} expressions on the scope. The {@link api/ng.$rootScope.Scope#$watch `$watch`} expressions on the scope. The
`$watch` allows the directives to be notified of property changes, which allows the directive to `$watch` allows the directives to be notified of property changes, which allows the directive to
render the updated value to the DOM. render the updated value to the DOM.
@ -102,7 +102,7 @@ to test the behavior without being distracted by the rendering details.
## Scope Hierarchies ## Scope Hierarchies
Each Angular application has exactly one {@link api/angular.module.ng.$rootScope root scope}, but Each Angular application has exactly one {@link api/ng.$rootScope root scope}, but
may have several child scopes. may have several child scopes.
The application can have multiple scopes, because some {@link guide/directive directives} create The application can have multiple scopes, because some {@link guide/directive directives} create
@ -164,7 +164,7 @@ where the `department` property is defined.
Scopes are attached to the DOM as `$scope` data property, and can be retrieved for debugging Scopes are attached to the DOM as `$scope` data property, and can be retrieved for debugging
purposes. (It is unlikely that one would need to retrieve scopes in this way inside the purposes. (It is unlikely that one would need to retrieve scopes in this way inside the
application.) The location where the root scope is attached to the DOM is defined by the location application.) The location where the root scope is attached to the DOM is defined by the location
of {@link api/angular.module.ng.$compileProvider.directive.ngApp `ng-app`} directive. Typically of {@link api/ng.directive:ngApp `ng-app`} directive. Typically
`ng-app` is placed an the `<html>` element, but it can be placed on other elements as well, if, `ng-app` is placed an the `<html>` element, but it can be placed on other elements as well, if,
for example, only a portion of the view needs to be controlled by angular. for example, only a portion of the view needs to be controlled by angular.
@ -182,8 +182,8 @@ To examine the scope in the debugger:
## Scope Events Propagation ## Scope Events Propagation
Scopes can propagate events in similar fashion to DOM events. The event can be {@link Scopes can propagate events in similar fashion to DOM events. The event can be {@link
api/angular.module.ng.$rootScope.Scope#$broadcast broadcasted} to the scope children or {@link api/ng.$rootScope.Scope#$broadcast broadcasted} to the scope children or {@link
api/angular.module.ng.$rootScope.Scope#$emit emitted} to scope parents. api/ng.$rootScope.Scope#$emit emitted} to scope parents.
<example> <example>
<file name="script.js"> <file name="script.js">
@ -225,14 +225,14 @@ more events.
When the browser calls into JavaScript the code executes outside they Angular execution context, When the browser calls into JavaScript the code executes outside they Angular execution context,
which means that Angular is unaware of model modifications. To properly process model which means that Angular is unaware of model modifications. To properly process model
modifications the execution has to enter the Angular execution context using the {@link modifications the execution has to enter the Angular execution context using the {@link
api/angular.module.ng.$rootScope.Scope#$apply `$apply`} method. Only model modifications which api/ng.$rootScope.Scope#$apply `$apply`} method. Only model modifications which
execute inside the `$apply` method will be properly accounted for by Angular. For example if a execute inside the `$apply` method will be properly accounted for by Angular. For example if a
directive listens on DOM events, such as {@link directive listens on DOM events, such as {@link
api/angular.module.ng.$compileProvider.directive.ngClick `ng-click`} it must evaluate the api/ng.directive:ngClick `ng-click`} it must evaluate the
expression inside the `$apply` method. expression inside the `$apply` method.
After evaluating the expression `$apply` method performs a {@link After evaluating the expression `$apply` method performs a {@link
api/angular.module.ng.$rootScope.Scope#$digest `$digest`}. In $digest phase the scope examines all api/ng.$rootScope.Scope#$digest `$digest`}. In $digest phase the scope examines all
of the `$watch` expressions and compares them with previous value. This dirty checking, is done of the `$watch` expressions and compares them with previous value. This dirty checking, is done
asynchronously. This means that assignment such as `$scope.username="angular"` will not asynchronously. This means that assignment such as `$scope.username="angular"` will not
immediately cause a `$watch` to be notified, instead the `$watch` notification is delayed until immediately cause a `$watch` to be notified, instead the `$watch` notification is delayed until
@ -243,27 +243,27 @@ the `$digest` phase. This delay is desirable, since it coalesces multiple model
1. **Creation** 1. **Creation**
The {@link api/angular.module.ng.$rootScope root scope} is created during the application The {@link api/ng.$rootScope root scope} is created during the application
bootstrap by the {@link api/angular.module.AUTO.$injector $injector}. During template bootstrap by the {@link api/AUTO.$injector $injector}. During template
linking, some directives create new child scopes. linking, some directives create new child scopes.
2. **Watcher registration** 2. **Watcher registration**
During template linking directives register {@link During template linking directives register {@link
api/angular.module.ng.$rootScope.Scope#$watch watches} on the scope. This watches will be api/ng.$rootScope.Scope#$watch watches} on the scope. This watches will be
used to propagate model values to the DOM. used to propagate model values to the DOM.
3. **Model mutation** 3. **Model mutation**
For mutations to be properly observed, you should make them only within the {@link For mutations to be properly observed, you should make them only within the {@link
api/angular.module.ng.$rootScope.Scope#$apply scope.$apply()}. (Angular apis do this api/ng.$rootScope.Scope#$apply scope.$apply()}. (Angular apis do this
implicitly, so no extra `$apply` call is needed when doing synchronous work in controllers, implicitly, so no extra `$apply` call is needed when doing synchronous work in controllers,
or asynchronous work with {@link api/angular.module.ng.$http $http} or {@link or asynchronous work with {@link api/ng.$http $http} or {@link
api/angular.module.ng.$defer $defer} services. api/ng.$defer $defer} services.
4. **Mutation observation** 4. **Mutation observation**
At the end `$apply`, Angular performs a {@link api/angular.module.ng.$rootScope.Scope#$digest At the end `$apply`, Angular performs a {@link api/ng.$rootScope.Scope#$digest
$digest} cycle on the root scope, which then propagates throughout all child scopes. During $digest} cycle on the root scope, which then propagates throughout all child scopes. During
the `$digest` cycle, all `$watch`ed expressions or functions are checked for model mutation the `$digest` cycle, all `$watch`ed expressions or functions are checked for model mutation
and if a mutation is detected, the `$watch` listener is called. and if a mutation is detected, the `$watch` listener is called.
@ -271,7 +271,7 @@ the `$digest` phase. This delay is desirable, since it coalesces multiple model
5. **Scope destruction** 5. **Scope destruction**
When child scopes are no longer needed, it is the responsibility of the child scope creator When child scopes are no longer needed, it is the responsibility of the child scope creator
to destroy them via {@link api/angular.module.ng.$rootScope.Scope#$destroy scope.$destroy()} to destroy them via {@link api/ng.$rootScope.Scope#$destroy scope.$destroy()}
API. This will stop propagation of `$digest` calls into the child scope and allow for memory 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. used by the child scope models to be reclaimed by the garbage collector.
@ -279,30 +279,30 @@ the `$digest` phase. This delay is desirable, since it coalesces multiple model
### Scopes and Directives ### Scopes and Directives
During the compilation phase, the {@link compiler compiler} matches {@link During the compilation phase, the {@link compiler compiler} matches {@link
api/angular.module.ng.$compileProvider.directive directives} against the DOM template. The directives api/ng.$compileProvider.directive directives} against the DOM template. The directives
usually fall into one of two categories: usually fall into one of two categories:
- Observing {@link api/angular.module.ng.$compileProvider.directive directives}, such as - Observing {@link api/ng.$compileProvider.directive directives}, such as
double-curly expressions `{{expression}}`, register listeners using the {@link double-curly expressions `{{expression}}`, register listeners using the {@link
api/angular.module.ng.$rootScope.Scope#$watch $watch()} method. This type of directive needs api/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. to be notified whenever the expression changes so that it can update the view.
- Listener directives, such as {@link api/angular.module.ng.$compileProvider.directive.ngClick - Listener directives, such as {@link api/ng.directive:ngClick
ng-click}, register a listener with the DOM. When the DOM listener fires, the directive 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 executes the associated expression and updates the view using the {@link
api/angular.module.ng.$rootScope.Scope#$apply $apply()} method. api/ng.$rootScope.Scope#$apply $apply()} method.
When an external event (such as a user action, timer or XHR) is received, the associated {@link When an external event (such as a user action, timer or XHR) is received, the associated {@link
expression expression} must be applied to the scope through the {@link expression expression} must be applied to the scope through the {@link
api/angular.module.ng.$rootScope.Scope#$apply $apply()} method so that all listeners are updated api/ng.$rootScope.Scope#$apply $apply()} method so that all listeners are updated
correctly. correctly.
### Directives that Create Scopes ### Directives that Create Scopes
In most cases, {@link api/angular.module.ng.$compileProvider.directive directives} and scopes interact In most cases, {@link api/ng.$compileProvider.directive directives} and scopes interact
but do not create new instances of scope. However, some directives, such as {@link but do not create new instances of scope. However, some directives, such as {@link
api/angular.module.ng.$compileProvider.directive.ngController ng-controller} and {@link api/ng.directive:ngController ng-controller} and {@link
api/angular.module.ng.$compileProvider.directive.ngRepeat ng-repeat}, create new child scopes api/ng.directive:ngRepeat ng-repeat}, create new child scopes
and attach the child scope to the corresponding DOM element. You can retrieve a scope for any DOM and 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. element by using an `angular.element(aDomElement).scope()` method call.
@ -311,14 +311,14 @@ element by using an `angular.element(aDomElement).scope()` method call.
Scopes and controllers interact with each other in the following situations: Scopes and controllers interact with each other in the following situations:
- Controllers use scopes to expose controller methods to templates (see {@link - Controllers use scopes to expose controller methods to templates (see {@link
api/angular.module.ng.$compileProvider.directive.ngController ng-controller}). api/ng.directive:ngController ng-controller}).
- Controllers define methods (behavior) that can mutate the model (properties on the scope). - Controllers define methods (behavior) that can mutate the model (properties on the scope).
- Controllers may register {@link api/angular.module.ng.$rootScope.Scope#$watch watches} on - Controllers may register {@link api/ng.$rootScope.Scope#$watch watches} on
the model. These watches execute immediately after the controller behavior executes. the model. These watches execute immediately after the controller behavior executes.
See the {@link api/angular.module.ng.$compileProvider.directive.ngController ng-controller} for more See the {@link api/ng.directive:ngController ng-controller} for more
information. information.

View file

@ -68,7 +68,7 @@ manipulate the DOM.
### What is testability like in angular? ### What is testability like in angular?
Very testable. It has an integrated dependency injection framework. See Very testable. It has an integrated dependency injection framework. See
{@link api/angular.module.ng service} for details. {@link api/ng service} for details.
### How can I learn more about angular? ### How can I learn more about angular?

View file

@ -184,7 +184,7 @@ __`app/index.html`:__
This code downloads the `angular.js` script and registers a callback that will be executed by the This code downloads the `angular.js` script and registers a callback that will be executed by the
browser when the containing HTML page is fully downloaded. When the callback is executed, Angular browser when the containing HTML page is fully downloaded. When the callback is executed, Angular
looks for the {@link api/angular.module.ng.$compileProvider.directive.ngApp ngApp} directive. If looks for the {@link api/ng.directive:ngApp ngApp} directive. If
Angular finds the directive, it will bootstrap the application with the root of the application DOM Angular finds the directive, it will bootstrap the application with the root of the application DOM
being the element on which the `ngApp` directive was defined. being the element on which the `ngApp` directive was defined.
@ -215,10 +215,10 @@ for most cases. In advanced cases, such as when using script loaders, you can us
There are 3 important things that happen during the app bootstrap: There are 3 important things that happen during the app bootstrap:
1. The {@link api/angular.module.AUTO.$injector injector} that will be used for dependency injection 1. The {@link api/AUTO.$injector injector} that will be used for dependency injection
within this app is created. within this app is created.
2. The injector will then create the {@link api/angular.module.ng.$rootScope root scope} that will 2. The injector will then create the {@link api/ng.$rootScope root scope} that will
become the context for the model of our application. become the context for the model of our application.
3. Angular will then "compile" the DOM starting at the `ngApp` root element, processing any 3. Angular will then "compile" the DOM starting at the `ngApp` root element, processing any

View file

@ -52,7 +52,7 @@ __`app/index.html`:__
</pre> </pre>
We replaced the hard-coded phone list with the We replaced the hard-coded phone list with the
{@link api/angular.module.ng.$compileProvider.directive.ngRepeat ngRepeat directive} and two {@link api/ng.directive:ngRepeat ngRepeat directive} and two
{@link guide/expression Angular expressions} enclosed in curly braces: {@link guide/expression Angular expressions} enclosed in curly braces:
`{{phone.name}}` and `{{phone.snippet}}`: `{{phone.name}}` and `{{phone.snippet}}`:
@ -96,7 +96,7 @@ as follows:
* `PhoneListCtrl` — the name of our controller function (located in the JavaScript file * `PhoneListCtrl` — the name of our controller function (located in the JavaScript file
`controllers.js`), matches the value of the `controllers.js`), matches the value of the
{@link api/angular.module.ng.$compileProvider.directive.ngController ngController} directive located {@link api/ng.directive:ngController ngController} directive located
on the `<body>` tag. on the `<body>` tag.
* The phone data is then attached to the *scope* (`$scope`) that was injected into our controller * The phone data is then attached to the *scope* (`$scope`) that was injected into our controller
@ -110,7 +110,7 @@ contained in the template, data model, and controller, to keep models and views
sync. Any changes made to the model are reflected in the view; any changes that occur in the view sync. Any changes made to the model are reflected in the view; any changes that occur in the view
are reflected in the model. are reflected in the model.
To learn more about Angular scopes, see the {@link api/angular.module.ng.$rootScope.Scope angular scope documentation}. To learn more about Angular scopes, see the {@link api/ng.$rootScope.Scope angular scope documentation}.
## Tests ## Tests

View file

@ -55,7 +55,7 @@ __`app/index.html`:__
</pre> </pre>
We added a standard HTML `<input>` tag and used angular's We added a standard HTML `<input>` tag and used angular's
{@link api/angular.module.ng.$filter.filter $filter} function to process the input for the {@link api/ng.filter:filter $filter} function to process the input for the
`ngRepeate` directive. `ngRepeate` directive.
This lets a user enter search criteria and immediately see the effects of their search on the phone This lets a user enter search criteria and immediately see the effects of their search on the phone
@ -71,7 +71,7 @@ the DOM to reflect the current state of the model.
<img class="diagram" src="img/tutorial/tutorial_03.png"> <img class="diagram" src="img/tutorial/tutorial_03.png">
* Use of `filter` filter. The {@link api/angular.module.ng.$filter.filter filter} function uses the * Use of `filter` filter. The {@link api/ng.filter:filter filter} function uses the
`query` value to create a new array that contains only those records that match the `query`. `query` value to create a new array that contains only those records that match the `query`.
`ngRepeat` automatically updates the view in response to the changing number of phones returned `ngRepeat` automatically updates the view in response to the changing number of phones returned
@ -152,8 +152,8 @@ and title elements:
While using double curlies works fine in within the title element, you might have noticed that While using double curlies works fine in within the title element, you might have noticed that
for a split second they are actually displayed to the user while the page is loading. A better for a split second they are actually displayed to the user while the page is loading. A better
solution would be to use the {@link api/angular.module.ng.$compileProvider.directive.ngBind solution would be to use the {@link api/ng.directive:ngBind
ngBind} or {@link api/angular.module.ng.$compileProvider.directive.ngBindTemplate ngBind} or {@link api/ng.directive:ngBindTemplate
ngBindTemplate} directives, which are invisible to the user while the page is loading: ngBindTemplate} directives, which are invisible to the user while the page is loading:
<title ng-bind-template="Google Phone Gallery: {{query}}">Google Phone Gallery</title> <title ng-bind-template="Google Phone Gallery: {{query}}">Google Phone Gallery</title>

View file

@ -47,7 +47,7 @@ two provided sorting options.
<img class="diagram" src="img/tutorial/tutorial_04.png"> <img class="diagram" src="img/tutorial/tutorial_04.png">
* We then chained the `filter` filter with {@link api/angular.module.ng.$filter.orderBy `orderBy`} * We then chained the `filter` filter with {@link api/ng.filter:orderBy `orderBy`}
filter to further process the input into the repeater. `orderBy` is a filter that takes an input filter to further process the input into the repeater. `orderBy` is a filter that takes an input
array, copies it and reorders the copy which is then returned. array, copies it and reorders the copy which is then returned.

View file

@ -6,8 +6,8 @@
Enough of building an app with three phones in a hard-coded dataset! Let's fetch a larger dataset Enough of building an app with three phones in a hard-coded dataset! Let's fetch a larger dataset
from our server using one of angular's built-in {@link api/angular.module.ng services} called {@link from our server using one of angular's built-in {@link api/ng services} called {@link
api/angular.module.ng.$http $http}. We will use angular's {@link guide/di dependency api/ng.$http $http}. We will use angular's {@link guide/di dependency
injection (DI)} to provide the service to the `PhoneListCtrl` controller. injection (DI)} to provide the service to the `PhoneListCtrl` controller.
@ -42,9 +42,9 @@ Following is a sample of the file:
## Controller ## Controller
We'll use angular's {@link api/angular.module.ng.$http $http} service in our controller to make an HTTP We'll use angular's {@link api/ng.$http $http} service in our controller to make an HTTP
request to your web server to fetch the data in the `app/phones/phones.json` file. `$http` is just request to your web server to fetch the data in the `app/phones/phones.json` file. `$http` is just
one of several built-in {@link api/angular.module.ng angular services} that handle common operations one of several built-in {@link api/ng angular services} that handle common operations
in web apps. Angular injects these services for you where you need them. in web apps. Angular injects these services for you where you need them.
Services are managed by angular's {@link guide/di DI subsystem}. Dependency injection Services are managed by angular's {@link guide/di DI subsystem}. Dependency injection
@ -71,7 +71,7 @@ relative to our `index.html` file). The server responds by providing the data in
browser and our app they both look the same. For the sake of simplicity we used a json file in this browser and our app they both look the same. For the sake of simplicity we used a json file in this
tutorial.) tutorial.)
The `$http` service returns a {@link api/angular.module.ng.$q promise object} with a `success` The `$http` service returns a {@link api/ng.$q promise object} with a `success`
method. We call this method to handle the asynchronous response and assign the phone data to the method. We call this method to handle the asynchronous response and assign the phone data to the
scope controlled by this controller, as a model called `phones`. Notice that angular detected the scope controlled by this controller, as a model called `phones`. Notice that angular detected the
json response and parsed it for us! json response and parsed it for us!
@ -155,9 +155,9 @@ use to access and configure the injector.
We created the controller in the test environment, as follows: We created the controller in the test environment, as follows:
* We used the `inject` helper method to inject instances of * We used the `inject` helper method to inject instances of
{@link api/angular.module.ng.$rootScope $rootScope}, {@link api/ng.$rootScope $rootScope},
{@link api/angular.module.ng.$controller $controller} and {@link api/ng.$controller $controller} and
{@link api/angular.module.ng.$httpBackend $httpBackend} services into the Jasmine's `beforeEach` {@link api/ng.$httpBackend $httpBackend} services into the Jasmine's `beforeEach`
function. These instances come from an injector which is recreated from scratch for every single function. These instances come from an injector which is recreated from scratch for every single
test. This guarantees that each test starts from a well known starting point and each test is test. This guarantees that each test starts from a well known starting point and each test is
isolated from the work done in other tests. isolated from the work done in other tests.

View file

@ -61,7 +61,7 @@ now-familiar double-curly brace binding in the `href` attribute values. In step
the element attribute. the element attribute.
We also added phone images next to each record using an image tag with the {@link We also added phone images next to each record using an image tag with the {@link
api/angular.module.ng.$compileProvider.directive.ngSrc ngSrc} directive. That directive prevents the api/ng.directive:ngSrc ngSrc} directive. That directive prevents the
browser from treating the angular `{{ expression }}` markup literally, and initiating a request to browser from treating the angular `{{ expression }}` markup literally, and initiating a request to
invalid url `http://localhost:8000/app/{{phone.imageUrl}}`, which it would have done if we had only invalid url `http://localhost:8000/app/{{phone.imageUrl}}`, which it would have done if we had only
specified an attribute binding in a regular `src` attribute (`<img class="diagram" src="{{phone.imageUrl}}">`). specified an attribute binding in a regular `src` attribute (`<img class="diagram" src="{{phone.imageUrl}}">`).

View file

@ -36,8 +36,8 @@ our application. Other "partial templates" are then included into this layout te
the current "route" — the view that is currently displayed to the user. the current "route" — the view that is currently displayed to the user.
Application routes in angular are declared via the Application routes in angular are declared via the
{@link api/angular.module.ng.$routeProvider $routeProvider}, which is the provider of the {@link api/ng.$routeProvider $routeProvider}, which is the provider of the
{@link api/angular.module.ng.$route $route service}. This service makes it easy to wire together {@link api/ng.$route $route service}. This service makes it easy to wire together
controllers, view templates, and the current controllers, view templates, and the current
URL location in the browser. Using this feature we can implement {@link URL location in the browser. Using this feature we can implement {@link
http://en.wikipedia.org/wiki/Deep_linking deep linking}, which lets us utilize the browser's http://en.wikipedia.org/wiki/Deep_linking deep linking}, which lets us utilize the browser's
@ -104,11 +104,11 @@ the browser address doesn't match either of our routes.
Note the use of the `:phoneId` parameter in the second route declaration. The `$route` service uses Note the use of the `:phoneId` parameter in the second route declaration. The `$route` service uses
the route declaration — `'/phones/:phoneId'` — as a template that is matched against the current the route declaration — `'/phones/:phoneId'` — as a template that is matched against the current
URL. All variables defined with the `:` notation are extracted into the URL. All variables defined with the `:` notation are extracted into the
{@link api/angular.module.ng.$routeParams $routeParams} object. {@link api/ng.$routeParams $routeParams} object.
In order for our application to bootstrap with our newly created module we'll also need to specify In order for our application to bootstrap with our newly created module we'll also need to specify
the module name as the value of the {@link api/angular.module.ng.$compileProvider.directive.ngApp ngApp} the module name as the value of the {@link api/ng.directive:ngApp ngApp}
directive: directive:
__`app/index.html`:__ __`app/index.html`:__
@ -134,7 +134,7 @@ function PhoneDetailCtrl($scope, $routeParams) {
## Template ## Template
The `$route` service is usually used in conjunction with the {@link api/angular.module.ng.$compileProvider.directive.ngView The `$route` service is usually used in conjunction with the {@link api/ng.directive:ngView
ngView} directive. The role of the `ngView` directive is to include the view template for the current ngView} directive. The role of the `ngView` directive is to include the view template for the current
route into the layout template, which makes it a perfect fit for our `index.html` template. route into the layout template, which makes it a perfect fit for our `index.html` template.

View file

@ -15,7 +15,7 @@ phone in the phone list.
Now when you click on a phone on the list, the phone details page with phone-specific information Now when you click on a phone on the list, the phone details page with phone-specific information
is displayed. is displayed.
To implement the phone details view we will use {@link api/angular.module.ng.$http $http} to fetch To implement the phone details view we will use {@link api/ng.$http $http} to fetch
our data, and we'll flesh out the `phone-details.html` view template. our data, and we'll flesh out the `phone-details.html` view template.
The most important changes are listed below. You can see the full diff on {@link The most important changes are listed below. You can see the full diff on {@link

View file

@ -121,7 +121,7 @@ output.
# Experiments # Experiments
* Let's experiment with some of the {@link api/angular.module.ng.$filter built-in angular filters} and add the * Let's experiment with some of the {@link api/ng.$filter built-in angular filters} and add the
following bindings to `index.html`: following bindings to `index.html`:
* `{{ "lower cap string" | uppercase }}` * `{{ "lower cap string" | uppercase }}`
* `{{ {foo: "bar", baz: 23} | json }}` * `{{ {foo: "bar", baz: 23} | json }}`

View file

@ -63,7 +63,7 @@ __`app/partials/phone-detail.html`:__
We bound the `ngSrc` directive of the large image to the `mainImageUrl` property. We bound the `ngSrc` directive of the large image to the `mainImageUrl` property.
We also registered an {@link api/angular.module.ng.$compileProvider.directive.ngClick `ngClick`} We also registered an {@link api/ng.directive:ngClick `ngClick`}
handler with thumbnail images. When a user clicks on one of the thumbnail images, the handler will handler with thumbnail images. When a user clicks on one of the thumbnail images, the handler will
use the `setImage` event handler function to change the value of the `mainImageUrl` property to the use the `setImage` event handler function to change the value of the `mainImageUrl` property to the
url of the thumbnail image. url of the thumbnail image.

View file

@ -14,7 +14,7 @@ In this step, you will improve the way our app fetches data.
The last improvement we will make to our app is to define a custom service that represents a {@link The last improvement we will make to our app is to define a custom service that represents a {@link
http://en.wikipedia.org/wiki/Representational_State_Transfer RESTful} client. Using this client we http://en.wikipedia.org/wiki/Representational_State_Transfer RESTful} client. Using this client we
can make xhr requests for data in an easier way, without having to deal with the lower-level {@link can make xhr requests for data in an easier way, without having to deal with the lower-level {@link
api/angular.module.ng.$http $http} API, HTTP methods and URLs. api/ng.$http $http} API, HTTP methods and URLs.
The most important changes are listed below. You can see the full diff on {@link The most important changes are listed below. You can see the full diff on {@link
https://github.com/angular/angular-phonecat/compare/step-10...step-11 https://github.com/angular/angular-phonecat/compare/step-10...step-11
@ -52,17 +52,17 @@ of the service - 'Phone' - and the factory function. The factory function is sim
controller's constructor in that both can declare dependencies via function arguments. The Phone controller's constructor in that both can declare dependencies via function arguments. The Phone
service declared a dependency on the `$resource` service. service declared a dependency on the `$resource` service.
The {@link api/angular.module.ngResource.$resource `$resource`} service makes it easy to create a The {@link api/ngResource.$resource `$resource`} service makes it easy to create a
{@link http://en.wikipedia.org/wiki/Representational_State_Transfer RESTful} client with just a few {@link http://en.wikipedia.org/wiki/Representational_State_Transfer RESTful} client with just a few
lines of code. This client can then be used in our application, instead of the lower-level {@link lines of code. This client can then be used in our application, instead of the lower-level {@link
api/angular.module.ng.$http $http} service. api/ng.$http $http} service.
## Controller ## Controller
We simplified our sub-controllers (`PhoneListCtrl` and `PhoneDetailCtrl`) by factoring out the We simplified our sub-controllers (`PhoneListCtrl` and `PhoneDetailCtrl`) by factoring out the
lower-level {@link api/angular.module.ng.$http $http} service, replacing it with a new service called lower-level {@link api/ng.$http $http} service, replacing it with a new service called
`Phone`. Angular's {@link api/angular.module.ngResource.$resource `$resource`} service is easier to `Phone`. Angular's {@link api/ngResource.$resource `$resource`} service is easier to
use than `$http for interacting with data sources exposed as RESTful resources. It is also easier use than `$http for interacting with data sources exposed as RESTful resources. It is also easier
now to understand what the code in our controllers is doing. now to understand what the code in our controllers is doing.
@ -122,7 +122,7 @@ We have modified our unit tests to verify that our new service is issuing HTTP r
processing them as expected. The tests also check that our controllers are interacting with the processing them as expected. The tests also check that our controllers are interacting with the
service correctly. service correctly.
The {@link api/angular.module.ngResource.$resource $resource} service augments the response object The {@link api/ngResource.$resource $resource} service augments the response object
with methods for updating and deleting the resource. If we were to use the standard `toEqual` with methods for updating and deleting the resource. If we were to use the standard `toEqual`
matcher, our tests would fail because the test values would not match the responses exactly. To matcher, our tests would fail because the test values would not match the responses exactly. To
solve the problem, we use a newly-defined `toEqualData` {@link solve the problem, we use a newly-defined `toEqualData` {@link

View file

@ -203,17 +203,17 @@ describe('ngdoc', function() {
describe('merge', function() { describe('merge', function() {
it('should merge child with parent', function() { it('should merge child with parent', function() {
var parent = new Doc({id: 'angular.module.ng.abc', name: 'angular.module.ng.abc', section: 'api'}); var parent = new Doc({id: 'ng.abc', name: 'ng.abc', section: 'api'});
var methodA = new Doc({name: 'methodA', methodOf: 'angular.module.ng.abc'}); var methodA = new Doc({name: 'methodA', methodOf: 'ng.abc'});
var methodB = new Doc({name: 'methodB', methodOf: 'angular.module.ng.abc'}); var methodB = new Doc({name: 'methodB', methodOf: 'ng.abc'});
var propA = new Doc({name: 'propA', propertyOf: 'angular.module.ng.abc'}); var propA = new Doc({name: 'propA', propertyOf: 'ng.abc'});
var propB = new Doc({name: 'propB', propertyOf: 'angular.module.ng.abc'}); var propB = new Doc({name: 'propB', propertyOf: 'ng.abc'});
var eventA = new Doc({name: 'eventA', eventOf: 'angular.module.ng.abc'}); var eventA = new Doc({name: 'eventA', eventOf: 'ng.abc'});
var eventB = new Doc({name: 'eventB', eventOf: 'angular.module.ng.abc'}); var eventB = new Doc({name: 'eventB', eventOf: 'ng.abc'});
var docs = [methodB, methodA, eventB, eventA, propA, propB, parent]; // keep wrong order; var docs = [methodB, methodA, eventB, eventA, propA, propB, parent]; // keep wrong order;
ngdoc.merge(docs); ngdoc.merge(docs);
expect(docs.length).toEqual(1); expect(docs.length).toEqual(1);
expect(docs[0].id).toEqual('angular.module.ng.abc'); expect(docs[0].id).toEqual('ng.abc');
expect(docs[0].methods).toEqual([methodA, methodB]); expect(docs[0].methods).toEqual([methodA, methodB]);
expect(docs[0].events).toEqual([eventA, eventB]); expect(docs[0].events).toEqual([eventA, eventB]);
expect(docs[0].properties).toEqual([propA, propB]); expect(docs[0].properties).toEqual([propA, propB]);
@ -283,8 +283,8 @@ describe('ngdoc', function() {
expect(doc.requires).toEqual([ expect(doc.requires).toEqual([
{name:'$service', text:'<p>for \n<code>A</code></p>'}, {name:'$service', text:'<p>for \n<code>A</code></p>'},
{name:'$another', text:'<p>for <code>B</code></p>'}]); {name:'$another', text:'<p>for <code>B</code></p>'}]);
expect(doc.html()).toContain('<a href="api/angular.module.ng.$service">$service</a>'); expect(doc.html()).toContain('<a href="api/ng.$service">$service</a>');
expect(doc.html()).toContain('<a href="api/angular.module.ng.$another">$another</a>'); expect(doc.html()).toContain('<a href="api/ng.$another">$another</a>');
expect(doc.html()).toContain('<p>for \n<code>A</code></p>'); expect(doc.html()).toContain('<p>for \n<code>A</code></p>');
expect(doc.html()).toContain('<p>for <code>B</code></p>'); expect(doc.html()).toContain('<p>for <code>B</code></p>');
}); });

View file

@ -101,7 +101,7 @@ Doc.prototype = {
var self = this, var self = this,
IS_URL = /^(https?:\/\/|ftps?:\/\/|mailto:|\.|\/)/, IS_URL = /^(https?:\/\/|ftps?:\/\/|mailto:|\.|\/)/,
IS_ANGULAR = /^(api\/)?angular\./, IS_ANGULAR = /^(api\/)?(angular|ng|AUTO)\./,
IS_HASH = /^#/, IS_HASH = /^#/,
parts = trim(text).split(/(<pre>[\s\S]*?<\/pre>|<doc:example(\S*).*?>[\s\S]*?<\/doc:example>|<example[^>]*>[\s\S]*?<\/example>)/), parts = trim(text).split(/(<pre>[\s\S]*?<\/pre>|<doc:example(\S*).*?>[\s\S]*?<\/doc:example>|<example[^>]*>[\s\S]*?<\/example>)/),
seq = 0, seq = 0,
@ -201,7 +201,7 @@ Doc.prototype = {
} }
}); });
flush(); flush();
this.shortName = this.name.split(this.name.match(/#/) ? /#/ : /\./ ).pop(); this.shortName = this.name.split(/[\.:#]/).pop();
this.id = this.id || // if we have an id just use it this.id = this.id || // if we have an id just use it
(((this.file||'').match(/.*\/([^\/]*)\.ngdoc/)||{})[1]) || // try to extract it from file name (((this.file||'').match(/.*\/([^\/]*)\.ngdoc/)||{})[1]) || // try to extract it from file name
this.name; // default to name this.name; // default to name
@ -277,7 +277,7 @@ Doc.prototype = {
} }
dom.h('Dependencies', self.requires, function(require){ dom.h('Dependencies', self.requires, function(require){
dom.tag('code', function() { dom.tag('code', function() {
dom.tag('a', {href: 'api/angular.module.ng.' + require.name}, require.name); dom.tag('a', {href: 'api/ng.' + require.name}, require.name);
}); });
dom.html(require.text); dom.html(require.text);
}); });
@ -622,14 +622,15 @@ Doc.prototype = {
////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////
var GLOBALS = /^angular\.([^\.]*)$/, var GLOBALS = /^angular\.([^\.]+)$/,
MODULE = /^angular\.module\.([^\.]*)$/, MODULE = /^((?:(?!^angular\.)[^\.])+)$/,
MODULE_MOCK = /^angular\.mock\.([^\.]*)$/, MODULE_MOCK = /^angular\.mock\.([^\.]+)$/,
MODULE_DIRECTIVE = /^angular\.module\.([^\.]*)(?:\.\$compileProvider)?\.directive\.([^\.]*)$/, MODULE_DIRECTIVE = /^((?:(?!^angular\.)[^\.])+)\.directive:([^\.]+)$/,
MODULE_DIRECTIVE_INPUT = /^angular\.module\.([^\.]*)\.\$compileProvider\.directive\.input\.([^\.]*)$/, MODULE_DIRECTIVE_INPUT = /^((?:(?!^angular\.)[^\.])+)\.directive:input\.([^\.]+)$/,
MODULE_FILTER = /^angular\.module\.([^\.]*)\.\$?filter\.([^\.]*)$/, MODULE_FILTER = /^((?:(?!^angular\.)[^\.])+)\.filter:([^\.]+)$/,
MODULE_SERVICE = /^angular\.module\.([^\.]*)\.([^\.]*?)(Provider)?$/, MODULE_SERVICE = /^((?:(?!^angular\.)[^\.])+)\.([^\.]+?)(Provider)?$/,
MODULE_TYPE = /^angular\.module\.([^\.]*)\..*\.([A-Z][^\.]*)$/; MODULE_TYPE = /^((?:(?!^angular\.)[^\.])+)\..+\.([A-Z][^\.]+)$/;
function title(text) { function title(text) {
if (!text) return text; if (!text) return text;
@ -728,7 +729,7 @@ function scenarios(docs){
function metadata(docs){ function metadata(docs){
var pages = []; var pages = [];
docs.forEach(function(doc){ docs.forEach(function(doc){
var path = (doc.name || '').split(/(\.|\:\s+)/); var path = (doc.name || '').split(/(\.|\:)/);
for ( var i = 1; i < path.length; i++) { for ( var i = 1; i < path.length; i++) {
path.splice(i, 1); path.splice(i, 1);
} }

View file

@ -229,18 +229,18 @@ docsApp.controller.DocsController = function($scope, $location, $window, $cookie
var OFFLINE_COOKIE_NAME = 'ng-offline', var OFFLINE_COOKIE_NAME = 'ng-offline',
DOCS_PATH = /^\/(api)|(guide)|(cookbook)|(misc)|(tutorial)/, DOCS_PATH = /^\/(api)|(guide)|(cookbook)|(misc)|(tutorial)/,
INDEX_PATH = /^(\/|\/index[^\.]*.html)$/, INDEX_PATH = /^(\/|\/index[^\.]*.html)$/,
GLOBALS = /^angular\.([^\.]*)$/, GLOBALS = /^angular\.([^\.]+)$/,
MODULE = /^angular\.module\.([^\.]*)$/, MODULE = /^((?:(?!^angular\.)[^\.])+)$/,
MODULE_MOCK = /^angular\.mock\.([^\.]*)$/, MODULE_MOCK = /^angular\.mock\.([^\.]+)$/,
MODULE_DIRECTIVE = /^angular\.module\.([^\.]*)(?:\.\$compileProvider)?\.directive\.([^\.]*)$/, MODULE_DIRECTIVE = /^((?:(?!^angular\.)[^\.])+)\.directive:([^\.]+)$/,
MODULE_DIRECTIVE_INPUT = /^angular\.module\.([^\.]*)\.\$compileProvider\.directive\.input\.([^\.]*)$/, MODULE_DIRECTIVE_INPUT = /^((?:(?!^angular\.)[^\.])+)\.directive:input\.([^\.]+)$/,
MODULE_FILTER = /^angular\.module\.([^\.]*)\.\$?filter\.([^\.]*)$/, MODULE_FILTER = /^((?:(?!^angular\.)[^\.])+)\.filter:([^\.]+)$/,
MODULE_SERVICE = /^angular\.module\.([^\.]*)\.([^\.]*?)(Provider)?$/, MODULE_SERVICE = /^((?:(?!^angular\.)[^\.])+)\.([^\.]+?)(Provider)?$/,
MODULE_TYPE = /^angular\.module\.([^\.]*)\..*\.([A-Z][^\.]*)$/, MODULE_TYPE = /^((?:(?!^angular\.)[^\.])+)\..+\.([A-Z][^\.]+)$/,
URL = { URL = {
module: 'guide/module', module: 'guide/module',
directive: 'guide/directive', directive: 'guide/directive',
input: 'api/angular.module.ng.$compileProvider.directive.input', input: 'api/ng.directive:input',
filter: 'guide/dev_guide.templates.filters', filter: 'guide/dev_guide.templates.filters',
service: 'guide/dev_guide.services', service: 'guide/dev_guide.services',
type: 'guide/types' type: 'guide/types'
@ -325,22 +325,22 @@ docsApp.controller.DocsController = function($scope, $location, $window, $cookie
breadcrumb.push({ name: partialId }); breadcrumb.push({ name: partialId });
} else if (match = partialId.match(MODULE)) { } else if (match = partialId.match(MODULE)) {
breadcrumb.push({ name: match[1] }); breadcrumb.push({ name: match[1] });
} else if (match = partialId.match(MODULE_SERVICE)) {
breadcrumb.push({ name: match[1], url: sectionId + '/angular.module.' + match[1] });
breadcrumb.push({ name: match[2] });
} else if (match = partialId.match(MODULE_FILTER)) { } else if (match = partialId.match(MODULE_FILTER)) {
breadcrumb.push({ name: match[1], url: sectionId + '/angular.module.' + match[1] }); breadcrumb.push({ name: match[1], url: sectionId + '/' + match[1] });
breadcrumb.push({ name: match[2] }); breadcrumb.push({ name: match[2] });
} else if (match = partialId.match(MODULE_DIRECTIVE)) { } else if (match = partialId.match(MODULE_DIRECTIVE)) {
breadcrumb.push({ name: match[1], url: sectionId + '/angular.module.' + match[1] }); breadcrumb.push({ name: match[1], url: sectionId + '/' + match[1] });
breadcrumb.push({ name: match[2] }); breadcrumb.push({ name: match[2] });
} else if (match = partialId.match(MODULE_DIRECTIVE_INPUT)) { } else if (match = partialId.match(MODULE_DIRECTIVE_INPUT)) {
breadcrumb.push({ name: match[1], url: sectionId + '/angular.module.' + match[1] }); breadcrumb.push({ name: match[1], url: sectionId + '/' + match[1] });
breadcrumb.push({ name: 'input', url: URL.input }); breadcrumb.push({ name: 'input', url: URL.input });
breadcrumb.push({ name: match[2] }); breadcrumb.push({ name: match[2] });
} else if (match = partialId.match(MODULE_TYPE)) { } else if (match = partialId.match(MODULE_TYPE)) {
breadcrumb.push({ name: match[1], url: sectionId + '/angular.module.' + match[1] }); breadcrumb.push({ name: match[1], url: sectionId + '/' + match[1] });
breadcrumb.push({ name: match[2] }); breadcrumb.push({ name: match[2] });
} else if (match = partialId.match(MODULE_SERVICE)) {
breadcrumb.push({ name: match[1], url: sectionId + '/' + match[1] });
breadcrumb.push({ name: match[2] + (match[3] || '') });
} else if (match = partialId.match(MODULE_MOCK)) { } else if (match = partialId.match(MODULE_MOCK)) {
breadcrumb.push({ name: 'angular.mock.' + match[1] }); breadcrumb.push({ name: 'angular.mock.' + match[1] });
} else { } else {
@ -405,26 +405,28 @@ docsApp.controller.DocsController = function($scope, $location, $window, $cookie
bestMatch = match; bestMatch = match;
} }
if (id == 'angular.Module') { if (page.id == 'index') {
//skip
} else if (page.section != 'api') {
otherPages.push(page);
} else if (id == 'angular.Module') {
module('ng').types.push(page); module('ng').types.push(page);
} else if (match = id.match(GLOBALS)) { } else if (match = id.match(GLOBALS)) {
module('ng').globals.push(page); module('ng').globals.push(page);
} else if (match = id.match(MODULE)) { } else if (match = id.match(MODULE)) {
module(match[1]); module(match[1]);
} else if (match = id.match(MODULE_SERVICE)) {
module(match[1]).service(match[2])[match[3] ? 'provider' : 'instance'] = page;
} else if (match = id.match(MODULE_FILTER)) { } else if (match = id.match(MODULE_FILTER)) {
module(match[1]).filters.push(page); module(match[1]).filters.push(page);
} else if (match = id.match(MODULE_DIRECTIVE)) { } else if (match = id.match(MODULE_DIRECTIVE)) {
module(match[1]).directives.push(page); module(match[1]).directives.push(page);
} else if (match = id.match(MODULE_DIRECTIVE_INPUT)) { } else if (match = id.match(MODULE_DIRECTIVE_INPUT)) {
module(match[1]).directives.push(page); module(match[1]).directives.push(page);
} else if (match = id.match(MODULE_SERVICE)) {
module(match[1]).service(match[2])[match[3] ? 'provider' : 'instance'] = page;
} else if (match = id.match(MODULE_TYPE)) { } else if (match = id.match(MODULE_TYPE)) {
module(match[1]).types.push(page); module(match[1]).types.push(page);
} else if (match = id.match(MODULE_MOCK)) { } else if (match = id.match(MODULE_MOCK)) {
module('ngMock').globals.push(page); module('ngMock').globals.push(page);
} else if (page.section != 'api' && page.id != 'index'){
otherPages.push(page);
} }
}); });
@ -438,7 +440,7 @@ docsApp.controller.DocsController = function($scope, $location, $window, $cookie
if (!module) { if (!module) {
module = cache[name] = { module = cache[name] = {
name: name, name: name,
url: 'api/angular.module.' + name, url: 'api/' + name,
globals: [], globals: [],
directives: [], directives: [],
services: [], services: [],

View file

@ -61,7 +61,6 @@ var Error = window.Error,
/** @name angular */ /** @name angular */
angular = window.angular || (window.angular = {}), angular = window.angular || (window.angular = {}),
angularModule, angularModule,
/** @name angular.module.ng */
nodeName_, nodeName_,
uid = ['0', '0', '0']; uid = ['0', '0', '0'];
@ -520,7 +519,7 @@ function isLeafNode (node) {
* * If `source` is not an object or array, `source` is returned. * * If `source` is not an object or array, `source` is returned.
* *
* Note: this function is used to augment the Object type in Angular expressions. See * Note: this function is used to augment the Object type in Angular expressions. See
* {@link angular.module.ng.$filter} for more information about Angular arrays. * {@link ng.$filter} for more information about Angular arrays.
* *
* @param {*} source The source that will be used to make a copy. * @param {*} source The source that will be used to make a copy.
* Can be any type, including primitives, `null`, and `undefined`. * Can be any type, including primitives, `null`, and `undefined`.
@ -830,7 +829,7 @@ function encodeUriQuery(val, pctEncodeSpaces) {
/** /**
* @ngdoc directive * @ngdoc directive
* @name angular.module.ng.$compileProvider.directive.ngApp * @name ng.directive:ngApp
* *
* @element ANY * @element ANY
* @param {angular.Module} ngApp on optional application * @param {angular.Module} ngApp on optional application
@ -910,7 +909,7 @@ function angularInit(element, bootstrap) {
* *
* @param {Element} element DOM element which is the root of angular application. * @param {Element} element DOM element which is the root of angular application.
* @param {Array<String|Function>=} modules an array of module declarations. See: {@link angular.module modules} * @param {Array<String|Function>=} modules an array of module declarations. See: {@link angular.module modules}
* @returns {angular.module.auto.$injector} Returns the newly created injector for this app. * @returns {AUTO.$injector} Returns the newly created injector for this app.
*/ */
function bootstrap(element, modules) { function bootstrap(element, modules) {
element = jqLite(element); element = jqLite(element);

View file

@ -12,7 +12,7 @@
* @param {Array.<string|Function>} modules A list of module functions or their aliases. See * @param {Array.<string|Function>} modules A list of module functions or their aliases. See
* {@link angular.module}. The `ng` module must be explicitly added. * {@link angular.module}. The `ng` module must be explicitly added.
* @returns {function()} Injector function. See {@link angular.module.AUTO.$injector $injector}. * @returns {function()} Injector function. See {@link AUTO.$injector $injector}.
* *
* @example * @example
* Typical usage * Typical usage
@ -32,10 +32,10 @@
/** /**
* @ngdoc overview * @ngdoc overview
* @name angular.module.AUTO * @name AUTO
* @description * @description
* *
* Implicit module which gets automatically added to each {@link angular.module.AUTO.$injector $injector}. * Implicit module which gets automatically added to each {@link AUTO.$injector $injector}.
*/ */
var FN_ARGS = /^function\s*[^\(]*\(\s*([^\)]*)\)/m; var FN_ARGS = /^function\s*[^\(]*\(\s*([^\)]*)\)/m;
@ -74,13 +74,13 @@ function annotate(fn) {
/** /**
* @ngdoc object * @ngdoc object
* @name angular.module.AUTO.$injector * @name AUTO.$injector
* @function * @function
* *
* @description * @description
* *
* `$injector` is used to retrieve object instances as defined by * `$injector` is used to retrieve object instances as defined by
* {@link angular.module.AUTO.$provide provider}, instantiate types, invoke methods, * {@link AUTO.$provide provider}, instantiate types, invoke methods,
* and load modules. * and load modules.
* *
* The following always holds true: * The following always holds true:
@ -114,7 +114,7 @@ function annotate(fn) {
* ## Inference * ## Inference
* *
* In JavaScript calling `toString()` on a function returns the function definition. The definition can then be * In JavaScript calling `toString()` on a function returns the function definition. The definition can then be
* parsed and the function arguments can be extracted. *NOTE:* This does not work with minfication, and obfuscation * parsed and the function arguments can be extracted. *NOTE:* This does not work with minification, and obfuscation
* tools since these tools change the argument names. * tools since these tools change the argument names.
* *
* ## `$inject` Annotation * ## `$inject` Annotation
@ -126,8 +126,8 @@ function annotate(fn) {
/** /**
* @ngdoc method * @ngdoc method
* @name angular.module.AUTO.$injector#get * @name AUTO.$injector#get
* @methodOf angular.module.AUTO.$injector * @methodOf AUTO.$injector
* *
* @description * @description
* Return an instance of the service. * Return an instance of the service.
@ -138,8 +138,8 @@ function annotate(fn) {
/** /**
* @ngdoc method * @ngdoc method
* @name angular.module.AUTO.$injector#invoke * @name AUTO.$injector#invoke
* @methodOf angular.module.AUTO.$injector * @methodOf AUTO.$injector
* *
* @description * @description
* Invoke the method and supply the method arguments from the `$injector`. * Invoke the method and supply the method arguments from the `$injector`.
@ -153,8 +153,8 @@ function annotate(fn) {
/** /**
* @ngdoc method * @ngdoc method
* @name angular.module.AUTO.$injector#instantiate * @name AUTO.$injector#instantiate
* @methodOf angular.module.AUTO.$injector * @methodOf AUTO.$injector
* @description * @description
* Create a new instance of JS type. The method takes a constructor function invokes the new operator and supplies * Create a new instance of JS type. The method takes a constructor function invokes the new operator and supplies
* all of the arguments to the constructor function as specified by the constructor annotation. * all of the arguments to the constructor function as specified by the constructor annotation.
@ -167,8 +167,8 @@ function annotate(fn) {
/** /**
* @ngdoc method * @ngdoc method
* @name angular.module.AUTO.$injector#annotate * @name AUTO.$injector#annotate
* @methodOf angular.module.AUTO.$injector * @methodOf AUTO.$injector
* *
* @description * @description
* Returns an array of service names which the function is requesting for injection. This API is used by the injector * Returns an array of service names which the function is requesting for injection. This API is used by the injector
@ -249,7 +249,7 @@ function annotate(fn) {
/** /**
* @ngdoc object * @ngdoc object
* @name angular.module.AUTO.$provide * @name AUTO.$provide
* *
* @description * @description
* *
@ -299,8 +299,8 @@ function annotate(fn) {
/** /**
* @ngdoc method * @ngdoc method
* @name angular.module.AUTO.$provide#provider * @name AUTO.$provide#provider
* @methodOf angular.module.AUTO.$provide * @methodOf AUTO.$provide
* @description * @description
* *
* Register a provider for a service. The providers can be retrieved and can have additional configuration methods. * Register a provider for a service. The providers can be retrieved and can have additional configuration methods.
@ -309,17 +309,17 @@ function annotate(fn) {
* @param {(Object|function())} provider If the provider is: * @param {(Object|function())} provider If the provider is:
* *
* - `Object`: then it should have a `$get` method. The `$get` method will be invoked using * - `Object`: then it should have a `$get` method. The `$get` method will be invoked using
* {@link angular.module.AUTO.$injector#invoke $injector.invoke()} when an instance needs to be created. * {@link AUTO.$injector#invoke $injector.invoke()} when an instance needs to be created.
* - `Constructor`: a new instance of the provider will be created using * - `Constructor`: a new instance of the provider will be created using
* {@link angular.module.AUTO.$injector#instantiate $injector.instantiate()}, then treated as `object`. * {@link AUTO.$injector#instantiate $injector.instantiate()}, then treated as `object`.
* *
* @returns {Object} registered provider instance * @returns {Object} registered provider instance
*/ */
/** /**
* @ngdoc method * @ngdoc method
* @name angular.module.AUTO.$provide#factory * @name AUTO.$provide#factory
* @methodOf angular.module.AUTO.$provide * @methodOf AUTO.$provide
* @description * @description
* *
* A short hand for configuring services if only `$get` method is required. * A short hand for configuring services if only `$get` method is required.
@ -333,8 +333,8 @@ function annotate(fn) {
/** /**
* @ngdoc method * @ngdoc method
* @name angular.module.AUTO.$provide#service * @name AUTO.$provide#service
* @methodOf angular.module.AUTO.$provide * @methodOf AUTO.$provide
* @description * @description
* *
* A short hand for registering service of given class. * A short hand for registering service of given class.
@ -347,8 +347,8 @@ function annotate(fn) {
/** /**
* @ngdoc method * @ngdoc method
* @name angular.module.AUTO.$provide#value * @name AUTO.$provide#value
* @methodOf angular.module.AUTO.$provide * @methodOf AUTO.$provide
* @description * @description
* *
* A short hand for configuring services if the `$get` method is a constant. * A short hand for configuring services if the `$get` method is a constant.
@ -361,13 +361,13 @@ function annotate(fn) {
/** /**
* @ngdoc method * @ngdoc method
* @name angular.module.AUTO.$provide#constant * @name AUTO.$provide#constant
* @methodOf angular.module.AUTO.$provide * @methodOf AUTO.$provide
* @description * @description
* *
* A constant value, but unlike {@link angular.module.AUTO.$provide#value value} it can be injected * A constant value, but unlike {@link AUTO.$provide#value value} it can be injected
* into configuration function (other modules) and it is not interceptable by * into configuration function (other modules) and it is not interceptable by
* {@link angular.module.AUTO.$provide#decorator decorator}. * {@link AUTO.$provide#decorator decorator}.
* *
* @param {string} name The name of the constant. * @param {string} name The name of the constant.
* @param {*} value The constant value. * @param {*} value The constant value.
@ -377,8 +377,8 @@ function annotate(fn) {
/** /**
* @ngdoc method * @ngdoc method
* @name angular.module.AUTO.$provide#decorator * @name AUTO.$provide#decorator
* @methodOf angular.module.AUTO.$provide * @methodOf AUTO.$provide
* @description * @description
* *
* Decoration of service, allows the decorator to intercept the service instance creation. The * Decoration of service, allows the decorator to intercept the service instance creation. The
@ -387,7 +387,7 @@ function annotate(fn) {
* *
* @param {string} name The name of the service to decorate. * @param {string} name The name of the service to decorate.
* @param {function()} decorator This function will be invoked when the service needs to be * @param {function()} decorator This function will be invoked when the service needs to be
* instanciated. The function is called using the {@link angular.module.AUTO.$injector#invoke * instanciated. The function is called using the {@link AUTO.$injector#invoke
* injector.invoke} method and is therefore fully injectable. Local injection arguments: * injector.invoke} method and is therefore fully injectable. Local injection arguments:
* *
* * `$delegate` - The original service instance, which can be monkey patched, configured, * * `$delegate` - The original service instance, which can be monkey patched, configured,

View file

@ -65,7 +65,7 @@
* camelCase directive name, then the controller for this directive will be retrieved (e.g. * camelCase directive name, then the controller for this directive will be retrieved (e.g.
* `'ngModel'`). * `'ngModel'`).
* - `injector()` - retrieves the injector of the current element or its parent. * - `injector()` - retrieves the injector of the current element or its parent.
* - `scope()` - retrieves the {@link api/angular.module.ng.$rootScope.Scope scope} of the current * - `scope()` - retrieves the {@link api/ng.$rootScope.Scope scope} of the current
* element or its parent. * element or its parent.
* - `inheritedData()` - same as `data()`, but walks up the DOM until a value is found or the top * - `inheritedData()` - same as `data()`, but walks up the DOM until a value is found or the top
* parent element is reached. * parent element is reached.

View file

@ -31,7 +31,7 @@ function setupModuleLoader(window) {
* # Module * # Module
* *
* A module is a collocation of services, directives, filters, and configure information. Module * A module is a collocation of services, directives, filters, and configure information. Module
* is used to configure the {@link angular.module.AUTO.$injector $injector}. * is used to configure the {@link AUTO.$injector $injector}.
* *
* <pre> * <pre>
* // Create a new module * // Create a new module
@ -54,7 +54,7 @@ function setupModuleLoader(window) {
* </pre> * </pre>
* *
* However it's more likely that you'll just use * However it's more likely that you'll just use
* {@link angular.module.ng.$compileProvider.directive.ngApp ngApp} or * {@link ng.directive:ngApp ngApp} or
* {@link angular.bootstrap} to simplify this process for you. * {@link angular.bootstrap} to simplify this process for you.
* *
* @param {!string} name The name of the module to create or retrieve. * @param {!string} name The name of the module to create or retrieve.
@ -114,7 +114,7 @@ function setupModuleLoader(window) {
* @param {string} name service name * @param {string} name service name
* @param {Function} providerType Construction function for creating new instance of the service. * @param {Function} providerType Construction function for creating new instance of the service.
* @description * @description
* See {@link angular.module.AUTO.$provide#provider $provide.provider()}. * See {@link AUTO.$provide#provider $provide.provider()}.
*/ */
provider: invokeLater('$provide', 'provider'), provider: invokeLater('$provide', 'provider'),
@ -125,7 +125,7 @@ function setupModuleLoader(window) {
* @param {string} name service name * @param {string} name service name
* @param {Function} providerFunction Function for creating new instance of the service. * @param {Function} providerFunction Function for creating new instance of the service.
* @description * @description
* See {@link angular.module.AUTO.$provide#factory $provide.factory()}. * See {@link AUTO.$provide#factory $provide.factory()}.
*/ */
factory: invokeLater('$provide', 'factory'), factory: invokeLater('$provide', 'factory'),
@ -136,7 +136,7 @@ function setupModuleLoader(window) {
* @param {string} name service name * @param {string} name service name
* @param {Function} constructor A constructor function that will be instantiated. * @param {Function} constructor A constructor function that will be instantiated.
* @description * @description
* See {@link angular.module.AUTO.$provide#service $provide.service()}. * See {@link AUTO.$provide#service $provide.service()}.
*/ */
service: invokeLater('$provide', 'service'), service: invokeLater('$provide', 'service'),
@ -147,7 +147,7 @@ function setupModuleLoader(window) {
* @param {string} name service name * @param {string} name service name
* @param {*} object Service instance object. * @param {*} object Service instance object.
* @description * @description
* See {@link angular.module.AUTO.$provide#value $provide.value()}. * See {@link AUTO.$provide#value $provide.value()}.
*/ */
value: invokeLater('$provide', 'value'), value: invokeLater('$provide', 'value'),
@ -159,7 +159,7 @@ function setupModuleLoader(window) {
* @param {*} object Constant value. * @param {*} object Constant value.
* @description * @description
* Because the constant are fixed, they get applied before other provide methods. * Because the constant are fixed, they get applied before other provide methods.
* See {@link angular.module.AUTO.$provide#constant $provide.constant()}. * See {@link AUTO.$provide#constant $provide.constant()}.
*/ */
constant: invokeLater('$provide', 'constant', 'unshift'), constant: invokeLater('$provide', 'constant', 'unshift'),
@ -170,7 +170,7 @@ function setupModuleLoader(window) {
* @param {string} name Filter name. * @param {string} name Filter name.
* @param {Function} filterFactory Factory function for creating new instance of filter. * @param {Function} filterFactory Factory function for creating new instance of filter.
* @description * @description
* See {@link angular.module.ng.$filterProvider#register $filterProvider.register()}. * See {@link ng.$filterProvider#register $filterProvider.register()}.
*/ */
filter: invokeLater('$filterProvider', 'register'), filter: invokeLater('$filterProvider', 'register'),
@ -181,7 +181,7 @@ function setupModuleLoader(window) {
* @param {string} name Controller name. * @param {string} name Controller name.
* @param {Function} constructor Controller constructor function. * @param {Function} constructor Controller constructor function.
* @description * @description
* See {@link angular.module.ng.$controllerProvider#register $controllerProvider.register()}. * See {@link ng.$controllerProvider#register $controllerProvider.register()}.
*/ */
controller: invokeLater('$controllerProvider', 'register'), controller: invokeLater('$controllerProvider', 'register'),
@ -193,7 +193,7 @@ function setupModuleLoader(window) {
* @param {Function} directiveFactory Factory function for creating new instance of * @param {Function} directiveFactory Factory function for creating new instance of
* directives. * directives.
* @description * @description
* See {@link angular.module.ng.$compileProvider.directive $compileProvider.directive()}. * See {@link ng.$compileProvider.directive $compileProvider.directive()}.
*/ */
directive: invokeLater('$compileProvider', 'directive'), directive: invokeLater('$compileProvider', 'directive'),

View file

@ -1,6 +1,6 @@
/** /**
* @ngdoc function * @ngdoc function
* @name angular.module.ng.$anchorScroll * @name ng.$anchorScroll
* @requires $window * @requires $window
* @requires $location * @requires $location
* @requires $rootScope * @requires $rootScope

View file

@ -2,7 +2,7 @@
/** /**
* @ngdoc object * @ngdoc object
* @name angular.module.ng.$browser * @name ng.$browser
* @requires $log * @requires $log
* @description * @description
* This object has two goals: * This object has two goals:
@ -10,7 +10,7 @@
* - hide all the global state in the browser caused by the window object * - hide all the global state in the browser caused by the window object
* - abstract away all the browser specific features and inconsistencies * - abstract away all the browser specific features and inconsistencies
* *
* For tests we provide {@link angular.module.ngMock.$browser mock implementation} of the `$browser` * For tests we provide {@link ngMock.$browser mock implementation} of the `$browser`
* service, which can be used for convenient testing of the application without the interaction with * service, which can be used for convenient testing of the application without the interaction with
* the real browser apis. * the real browser apis.
*/ */
@ -87,8 +87,8 @@ function Browser(window, document, $log, $sniffer) {
/** /**
* @ngdoc method * @ngdoc method
* @name angular.module.ng.$browser#addPollFn * @name ng.$browser#addPollFn
* @methodOf angular.module.ng.$browser * @methodOf ng.$browser
* *
* @param {function()} fn Poll function to add * @param {function()} fn Poll function to add
* *
@ -128,8 +128,8 @@ function Browser(window, document, $log, $sniffer) {
/** /**
* @ngdoc method * @ngdoc method
* @name angular.module.ng.$browser#url * @name ng.$browser#url
* @methodOf angular.module.ng.$browser * @methodOf ng.$browser
* *
* @description * @description
* GETTER: * GETTER:
@ -142,7 +142,7 @@ function Browser(window, document, $log, $sniffer) {
* Returns its own instance to allow chaining * Returns its own instance to allow chaining
* *
* NOTE: this api is intended for use only by the $location service. Please use the * NOTE: this api is intended for use only by the $location service. Please use the
* {@link angular.module.ng.$location $location service} to change url. * {@link ng.$location $location service} to change url.
* *
* @param {string} url New url (when used as setter) * @param {string} url New url (when used as setter)
* @param {boolean=} replace Should new url replace current history record ? * @param {boolean=} replace Should new url replace current history record ?
@ -184,8 +184,8 @@ function Browser(window, document, $log, $sniffer) {
/** /**
* @ngdoc method * @ngdoc method
* @name angular.module.ng.$browser#onUrlChange * @name ng.$browser#onUrlChange
* @methodOf angular.module.ng.$browser * @methodOf ng.$browser
* @TODO(vojta): refactor to use node's syntax for events * @TODO(vojta): refactor to use node's syntax for events
* *
* @description * @description
@ -201,7 +201,7 @@ function Browser(window, document, $log, $sniffer) {
* The listener gets called with new url as parameter. * The listener gets called with new url as parameter.
* *
* NOTE: this api is intended for use only by the $location service. Please use the * NOTE: this api is intended for use only by the $location service. Please use the
* {@link angular.module.ng.$location $location service} to monitor url changes in angular apps. * {@link ng.$location $location service} to monitor url changes in angular apps.
* *
* @param {function(string)} listener Listener function to be called when url changes. * @param {function(string)} listener Listener function to be called when url changes.
* @return {function(string)} Returns the registered listener fn - handy if the fn is anonymous. * @return {function(string)} Returns the registered listener fn - handy if the fn is anonymous.
@ -250,8 +250,8 @@ function Browser(window, document, $log, $sniffer) {
/** /**
* @ngdoc method * @ngdoc method
* @name angular.module.ng.$browser#cookies * @name ng.$browser#cookies
* @methodOf angular.module.ng.$browser * @methodOf ng.$browser
* *
* @param {string=} name Cookie name * @param {string=} name Cookie name
* @param {string=} value Cokkie value * @param {string=} value Cokkie value
@ -309,8 +309,8 @@ function Browser(window, document, $log, $sniffer) {
/** /**
* @ngdoc method * @ngdoc method
* @name angular.module.ng.$browser#defer * @name ng.$browser#defer
* @methodOf angular.module.ng.$browser * @methodOf ng.$browser
* @param {function()} fn A function, who's execution should be defered. * @param {function()} fn A function, who's execution should be defered.
* @param {number=} [delay=0] of milliseconds to defer the function execution. * @param {number=} [delay=0] of milliseconds to defer the function execution.
* @returns {*} DeferId that can be used to cancel the task via `$browser.defer.cancel()`. * @returns {*} DeferId that can be used to cancel the task via `$browser.defer.cancel()`.
@ -338,8 +338,8 @@ function Browser(window, document, $log, $sniffer) {
/** /**
* THIS DOC IS NOT VISIBLE because ngdocs can't process docs for foo#method.method * THIS DOC IS NOT VISIBLE because ngdocs can't process docs for foo#method.method
* *
* @name angular.module.ng.$browser#defer.cancel * @name ng.$browser#defer.cancel
* @methodOf angular.module.ng.$browser.defer * @methodOf ng.$browser.defer
* *
* @description * @description
* Cancels a defered task identified with `deferId`. * Cancels a defered task identified with `deferId`.

View file

@ -1,6 +1,6 @@
/** /**
* @ngdoc object * @ngdoc object
* @name angular.module.ng.$cacheFactory * @name ng.$cacheFactory
* *
* @description * @description
* Factory that constructs cache objects. * Factory that constructs cache objects.
@ -153,12 +153,12 @@ function $CacheFactoryProvider() {
/** /**
* @ngdoc object * @ngdoc object
* @name angular.module.ng.$templateCache * @name ng.$templateCache
* *
* @description * @description
* Cache used for storing html templates. * Cache used for storing html templates.
* *
* See {@link angular.module.ng.$cacheFactory $cacheFactory}. * See {@link ng.$cacheFactory $cacheFactory}.
* *
*/ */
function $TemplateCacheProvider() { function $TemplateCacheProvider() {

View file

@ -23,20 +23,20 @@ var NON_ASSIGNABLE_MODEL_EXPRESSION = 'Non-assignable model expression: ';
/** /**
* @ngdoc function * @ngdoc function
* @name angular.module.ng.$compile * @name ng.$compile
* @function * @function
* *
* @description * @description
* Compiles a piece of HTML string or DOM into a template and produces a template function, which * Compiles a piece of HTML string or DOM into a template and produces a template function, which
* can then be used to link {@link angular.module.ng.$rootScope.Scope scope} and the template together. * can then be used to link {@link ng.$rootScope.Scope scope} and the template together.
* *
* The compilation is a process of walking the DOM tree and trying to match DOM elements to * The compilation is a process of walking the DOM tree and trying to match DOM elements to
* {@link angular.module.ng.$compileProvider.directive directives}. For each match it * {@link ng.$compileProvider.directive directives}. For each match it
* executes corresponding template function and collects the * executes corresponding template function and collects the
* instance functions into a single template function which is then returned. * instance functions into a single template function which is then returned.
* *
* The template function can then be used once to produce the view or as it is the case with * The template function can then be used once to produce the view or as it is the case with
* {@link angular.module.ng.$compileProvider.directive.ngRepeat repeater} many-times, in which * {@link ng.directive:ngRepeat repeater} many-times, in which
* case each call results in a view that is a DOM clone of the original template. * case each call results in a view that is a DOM clone of the original template.
* *
<doc:example module="compile"> <doc:example module="compile">
@ -99,7 +99,7 @@ var NON_ASSIGNABLE_MODEL_EXPRESSION = 'Non-assignable model expression: ';
* @returns {function(scope[, cloneAttachFn])} a link function which is used to bind template * @returns {function(scope[, cloneAttachFn])} a link function which is used to bind template
* (a DOM element/tree) to a scope. Where: * (a DOM element/tree) to a scope. Where:
* *
* * `scope` - A {@link angular.module.ng.$rootScope.Scope Scope} to bind to. * * `scope` - A {@link ng.$rootScope.Scope Scope} to bind to.
* * `cloneAttachFn` - If `cloneAttachFn` is provided, then the link function will clone the * * `cloneAttachFn` - If `cloneAttachFn` is provided, then the link function will clone the
* `template` and call the `cloneAttachFn` function allowing the caller to attach the * `template` and call the `cloneAttachFn` function allowing the caller to attach the
* cloned elements to the DOM document at the appropriate place. The `cloneAttachFn` is * cloned elements to the DOM document at the appropriate place. The `cloneAttachFn` is
@ -144,7 +144,7 @@ var NON_ASSIGNABLE_MODEL_EXPRESSION = 'Non-assignable model expression: ';
/** /**
* @ngdoc service * @ngdoc service
* @name angular.module.ng.$compileProvider * @name ng.$compileProvider
* @function * @function
* *
* @description * @description
@ -152,8 +152,8 @@ var NON_ASSIGNABLE_MODEL_EXPRESSION = 'Non-assignable model expression: ';
/** /**
* @ngdoc function * @ngdoc function
* @name angular.module.ng.$compileProvider#directive * @name ng.$compileProvider#directive
* @methodOf angular.module.ng.$compileProvider * @methodOf ng.$compileProvider
* @function * @function
* *
* @description * @description
@ -161,7 +161,7 @@ var NON_ASSIGNABLE_MODEL_EXPRESSION = 'Non-assignable model expression: ';
* *
* @param {string} name name of the directive. * @param {string} name name of the directive.
* @param {function} directiveFactory An injectable directive factory function. * @param {function} directiveFactory An injectable directive factory function.
* @returns {angular.module.ng.$compileProvider} Self for chaining. * @returns {ng.$compileProvider} Self for chaining.
*/ */
$CompileProvider.$inject = ['$provide']; $CompileProvider.$inject = ['$provide'];
function $CompileProvider($provide) { function $CompileProvider($provide) {
@ -174,8 +174,8 @@ function $CompileProvider($provide) {
/** /**
* @ngdoc function * @ngdoc function
* @name angular.module.ng.$compileProvider.directive * @name ng.$compileProvider.directive
* @methodOf angular.module.ng.$compileProvider * @methodOf ng.$compileProvider
* @function * @function
* *
* @description * @description
@ -1085,7 +1085,7 @@ function directiveNormalize(name) {
/** /**
* @ngdoc object * @ngdoc object
* @name angular.module.ng.$compile.directive.Attributes * @name ng.$compile.directive.Attributes
* @description * @description
* *
* A shared object between directive compile / linking functions which contains normalized DOM element * A shared object between directive compile / linking functions which contains normalized DOM element
@ -1097,8 +1097,8 @@ function directiveNormalize(name) {
/** /**
* @ngdoc property * @ngdoc property
* @name angular.module.ng.$compile.directive.Attributes#$attr * @name ng.$compile.directive.Attributes#$attr
* @propertyOf angular.module.ng.$compile.directive.Attributes * @propertyOf ng.$compile.directive.Attributes
* @returns {object} A map of DOM element attribute names to the normalized name. This is * @returns {object} A map of DOM element attribute names to the normalized name. This is
* needed to do reverse lookup from normalized name back to actual name. * needed to do reverse lookup from normalized name back to actual name.
*/ */
@ -1106,8 +1106,8 @@ function directiveNormalize(name) {
/** /**
* @ngdoc function * @ngdoc function
* @name angular.module.ng.$compile.directive.Attributes#$set * @name ng.$compile.directive.Attributes#$set
* @methodOf angular.module.ng.$compile.directive.Attributes * @methodOf ng.$compile.directive.Attributes
* @function * @function
* *
* @description * @description
@ -1115,7 +1115,7 @@ function directiveNormalize(name) {
* *
* *
* @param {string} name Normalized element attribute name of the property to modify. The name is * @param {string} name Normalized element attribute name of the property to modify. The name is
* revers translated using the {@link angular.module.ng.$compile.directive.Attributes#$attr $attr} * revers translated using the {@link ng.$compile.directive.Attributes#$attr $attr}
* property to the original name. * property to the original name.
* @param {string} value Value to set the attribute to. * @param {string} value Value to set the attribute to.
*/ */

View file

@ -2,13 +2,13 @@
/** /**
* @ngdoc object * @ngdoc object
* @name angular.module.ng.$controllerProvider * @name ng.$controllerProvider
* @description * @description
* The {@link angular.module.ng.$controller $controller service} is used by Angular to create new * The {@link ng.$controller $controller service} is used by Angular to create new
* controllers. * controllers.
* *
* This provider allows controller registration via the * This provider allows controller registration via the
* {@link angular.module.ng.$controllerProvider#register register} method. * {@link ng.$controllerProvider#register register} method.
*/ */
function $ControllerProvider() { function $ControllerProvider() {
var controllers = {}; var controllers = {};
@ -16,8 +16,8 @@ function $ControllerProvider() {
/** /**
* @ngdoc function * @ngdoc function
* @name angular.module.ng.$controllerProvider#register * @name ng.$controllerProvider#register
* @methodOf angular.module.ng.$controllerProvider * @methodOf ng.$controllerProvider
* @param {string} name Controller name * @param {string} name Controller name
* @param {Function|Array} constructor Controller constructor fn (optionally decorated with DI * @param {Function|Array} constructor Controller constructor fn (optionally decorated with DI
* annotations in the array notation). * annotations in the array notation).
@ -35,7 +35,7 @@ function $ControllerProvider() {
/** /**
* @ngdoc function * @ngdoc function
* @name angular.module.ng.$controller * @name ng.$controller
* @requires $injector * @requires $injector
* *
* @param {Function|string} constructor If called with a function then it's considered to be the * @param {Function|string} constructor If called with a function then it's considered to be the
@ -52,7 +52,7 @@ function $ControllerProvider() {
* @description * @description
* `$controller` service is responsible for instantiating controllers. * `$controller` service is responsible for instantiating controllers.
* *
* It's just simple call to {@link angular.module.AUTO.$injector $injector}, but extracted into * It's just simple call to {@link AUTO.$injector $injector}, but extracted into
* a service, so that one can override this service with {@link https://gist.github.com/1649788 * a service, so that one can override this service with {@link https://gist.github.com/1649788
* BC version}. * BC version}.
*/ */

View file

@ -2,15 +2,15 @@
/** /**
* @ngdoc function * @ngdoc function
* @name angular.module.ng.$defer * @name ng.$defer
* @deprecated Made obsolete by $timeout service. Please migrate your code. This service will be * @deprecated Made obsolete by $timeout service. Please migrate your code. This service will be
* removed with 1.0 final. * removed with 1.0 final.
* @requires $browser * @requires $browser
* *
* @description * @description
* Delegates to {@link angular.module.ng.$browser#defer $browser.defer}, but wraps the `fn` function * Delegates to {@link ng.$browser#defer $browser.defer}, but wraps the `fn` function
* into a try/catch block and delegates any exceptions to * into a try/catch block and delegates any exceptions to
* {@link angular.module.ng.$exceptionHandler $exceptionHandler} service. * {@link ng.$exceptionHandler $exceptionHandler} service.
* *
* In tests you can use `$browser.defer.flush()` to flush the queue of deferred functions. * In tests you can use `$browser.defer.flush()` to flush the queue of deferred functions.
* *
@ -21,8 +21,8 @@
/** /**
* @ngdoc function * @ngdoc function
* @name angular.module.ng.$defer#cancel * @name ng.$defer#cancel
* @methodOf angular.module.ng.$defer * @methodOf ng.$defer
* *
* @description * @description
* Cancels a defered task identified with `deferId`. * Cancels a defered task identified with `deferId`.

View file

@ -2,7 +2,7 @@
/** /**
* @ngdoc directive * @ngdoc directive
* @name angular.module.ng.$compileProvider.directive.ngHref * @name ng.directive:ngHref
* @restrict A * @restrict A
* *
* @description * @description
@ -82,7 +82,7 @@
/** /**
* @ngdoc directive * @ngdoc directive
* @name angular.module.ng.$compileProvider.directive.ngSrc * @name ng.directive:ngSrc
* @restrict A * @restrict A
* *
* @description * @description
@ -107,7 +107,7 @@
/** /**
* @ngdoc directive * @ngdoc directive
* @name angular.module.ng.$compileProvider.directive.ngDisabled * @name ng.directive:ngDisabled
* @restrict A * @restrict A
* *
* @description * @description
@ -146,7 +146,7 @@
/** /**
* @ngdoc directive * @ngdoc directive
* @name angular.module.ng.$compileProvider.directive.ngChecked * @name ng.directive:ngChecked
* @restrict A * @restrict A
* *
* @description * @description
@ -176,7 +176,7 @@
/** /**
* @ngdoc directive * @ngdoc directive
* @name angular.module.ng.$compileProvider.directive.ngMultiple * @name ng.directive:ngMultiple
* @restrict A * @restrict A
* *
* @description * @description
@ -212,7 +212,7 @@
/** /**
* @ngdoc directive * @ngdoc directive
* @name angular.module.ng.$compileProvider.directive.ngReadonly * @name ng.directive:ngReadonly
* @restrict A * @restrict A
* *
* @description * @description
@ -242,7 +242,7 @@
/** /**
* @ngdoc directive * @ngdoc directive
* @name angular.module.ng.$compileProvider.directive.ngSelected * @name ng.directive:ngSelected
* @restrict A * @restrict A
* *
* @description * @description

View file

@ -10,7 +10,7 @@ var nullFormCtrl = {
/** /**
* @ngdoc object * @ngdoc object
* @name angular.module.ng.$compileProvider.directive.form.FormController * @name ng.directive:form.FormController
* *
* @property {boolean} $pristine True if user has not interacted with the form yet. * @property {boolean} $pristine True if user has not interacted with the form yet.
* @property {boolean} $dirty True if user has already interacted with the form. * @property {boolean} $dirty True if user has already interacted with the form.
@ -27,7 +27,7 @@ var nullFormCtrl = {
* `FormController` keeps track of all its controls and nested forms as well as state of them, * `FormController` keeps track of all its controls and nested forms as well as state of them,
* such as being valid/invalid or dirty/pristine. * such as being valid/invalid or dirty/pristine.
* *
* Each {@link angular.module.ng.$compileProvider.directive.form form} directive creates an instance * Each {@link ng.directive:form form} directive creates an instance
* of `FormController`. * of `FormController`.
* *
*/ */
@ -124,11 +124,11 @@ function FormController(element, attrs) {
/** /**
* @ngdoc directive * @ngdoc directive
* @name angular.module.ng.$compileProvider.directive.ngForm * @name ng.directive:ngForm
* @restrict EAC * @restrict EAC
* *
* @description * @description
* Nestable alias of {@link angular.module.ng.$compileProvider.directive.form `form`} directive. HTML * Nestable alias of {@link ng.directive:form `form`} directive. HTML
* does not allow nesting of form elements. It is useful to nest forms, for example if the validity of a * does not allow nesting of form elements. It is useful to nest forms, for example if the validity of a
* sub-group of controls needs to be determined. * sub-group of controls needs to be determined.
* *
@ -139,21 +139,21 @@ function FormController(element, attrs) {
/** /**
* @ngdoc directive * @ngdoc directive
* @name angular.module.ng.$compileProvider.directive.form * @name ng.directive:form
* @restrict E * @restrict E
* *
* @description * @description
* Directive that instantiates * Directive that instantiates
* {@link angular.module.ng.$compileProvider.directive.form.FormController FormController}. * {@link ng.directive:form.FormController FormController}.
* *
* If `name` attribute is specified, the form controller is published onto the current scope under * If `name` attribute is specified, the form controller is published onto the current scope under
* this name. * this name.
* *
* # Alias: {@link angular.module.ng.$compileProvider.directive.ngForm `ngForm`} * # Alias: {@link ng.directive:ngForm `ngForm`}
* *
* In angular forms can be nested. This means that the outer form is valid when all of the child * In angular forms can be nested. This means that the outer form is valid when all of the child
* forms are valid as well. However browsers do not allow nesting of `<form>` elements, for this * forms are valid as well. However browsers do not allow nesting of `<form>` elements, for this
* reason angular provides {@link angular.module.ng.$compileProvider.directive.ngForm `ngForm`} alias * reason angular provides {@link ng.directive:ngForm `ngForm`} alias
* which behaves identical to `<form>` but allows form nesting. * which behaves identical to `<form>` but allows form nesting.
* *
* *
@ -177,8 +177,8 @@ function FormController(element, attrs) {
* You can use one of the following two ways to specify what javascript method should be called when * You can use one of the following two ways to specify what javascript method should be called when
* a form is submitted: * a form is submitted:
* *
* - {@link angular.module.ng.$compileProvider.directive.ngSubmit ngSubmit} directive on the form element * - {@link ng.directive:ngSubmit ngSubmit} directive on the form element
* - {@link angular.module.ng.$compileProvider.directive.ngClick ngClick} directive on the first * - {@link ng.directive:ngClick ngClick} directive on the first
* button or input field of type submit (input[type=submit]) * button or input field of type submit (input[type=submit])
* *
* To prevent double execution of the handler, use only one of ngSubmit or ngClick directives. This * To prevent double execution of the handler, use only one of ngSubmit or ngClick directives. This

View file

@ -8,7 +8,7 @@ var inputType = {
/** /**
* @ngdoc inputType * @ngdoc inputType
* @name angular.module.ng.$compileProvider.directive.input.text * @name ng.directive:input.text
* *
* @description * @description
* Standard HTML text input with angular data binding. * Standard HTML text input with angular data binding.
@ -74,7 +74,7 @@ var inputType = {
/** /**
* @ngdoc inputType * @ngdoc inputType
* @name angular.module.ng.$compileProvider.directive.input.number * @name ng.directive:input.number
* *
* @description * @description
* Text input with number validation and transformation. Sets the `number` validation * Text input with number validation and transformation. Sets the `number` validation
@ -142,7 +142,7 @@ var inputType = {
/** /**
* @ngdoc inputType * @ngdoc inputType
* @name angular.module.ng.$compileProvider.directive.input.url * @name ng.directive:input.url
* *
* @description * @description
* Text input with URL validation. Sets the `url` validation error key if the content is not a * Text input with URL validation. Sets the `url` validation error key if the content is not a
@ -207,7 +207,7 @@ var inputType = {
/** /**
* @ngdoc inputType * @ngdoc inputType
* @name angular.module.ng.$compileProvider.directive.input.email * @name ng.directive:input.email
* *
* @description * @description
* Text input with email validation. Sets the `email` validation error key if not a valid email * Text input with email validation. Sets the `email` validation error key if not a valid email
@ -270,7 +270,7 @@ var inputType = {
/** /**
* @ngdoc inputType * @ngdoc inputType
* @name angular.module.ng.$compileProvider.directive.input.radio * @name ng.directive:input.radio
* *
* @description * @description
* HTML radio button. * HTML radio button.
@ -311,7 +311,7 @@ var inputType = {
/** /**
* @ngdoc inputType * @ngdoc inputType
* @name angular.module.ng.$compileProvider.directive.input.checkbox * @name ng.directive:input.checkbox
* *
* @description * @description
* HTML checkbox. * HTML checkbox.
@ -627,13 +627,13 @@ function checkboxInputType(scope, element, attr, ctrl) {
/** /**
* @ngdoc directive * @ngdoc directive
* @name angular.module.ng.$compileProvider.directive.textarea * @name ng.directive:textarea
* @restrict E * @restrict E
* *
* @description * @description
* HTML textarea element control with angular data-binding. The data-binding and validation * HTML textarea element control with angular data-binding. The data-binding and validation
* properties of this element are exactly the same as those of the * properties of this element are exactly the same as those of the
* {@link angular.module.ng.$compileProvider.directive.input input element}. * {@link ng.directive:input input element}.
* *
* @param {string} ngModel Assignable angular expression to data-bind to. * @param {string} ngModel Assignable angular expression to data-bind to.
* @param {string=} name Property name of the form under which the control is published. * @param {string=} name Property name of the form under which the control is published.
@ -652,7 +652,7 @@ function checkboxInputType(scope, element, attr, ctrl) {
/** /**
* @ngdoc directive * @ngdoc directive
* @name angular.module.ng.$compileProvider.directive.input * @name ng.directive:input
* @restrict E * @restrict E
* *
* @description * @description
@ -764,7 +764,7 @@ var VALID_CLASS = 'ng-valid',
/** /**
* @ngdoc object * @ngdoc object
* @name angular.module.ng.$compileProvider.directive.ngModel.NgModelController * @name ng.directive:ngModel.NgModelController
* *
* @property {string} $viewValue Actual string value in the view. * @property {string} $viewValue Actual string value in the view.
* @property {*} $modelValue The value in the model, that the control is bound to. * @property {*} $modelValue The value in the model, that the control is bound to.
@ -880,8 +880,8 @@ var NgModelController = ['$scope', '$exceptionHandler', '$attrs', '$element', '$
/** /**
* @ngdoc function * @ngdoc function
* @name angular.module.ng.$compileProvider.directive.ngModel.NgModelController#$render * @name ng.directive:ngModel.NgModelController#$render
* @methodOf angular.module.ng.$compileProvider.directive.ngModel.NgModelController * @methodOf ng.directive:ngModel.NgModelController
* *
* @description * @description
* Called when the view needs to be updated. It is expected that the user of the ng-model * Called when the view needs to be updated. It is expected that the user of the ng-model
@ -908,8 +908,8 @@ var NgModelController = ['$scope', '$exceptionHandler', '$attrs', '$element', '$
/** /**
* @ngdoc function * @ngdoc function
* @name angular.module.ng.$compileProvider.directive.ngModel.NgModelController#$setValidity * @name ng.directive:ngModel.NgModelController#$setValidity
* @methodOf angular.module.ng.$compileProvider.directive.ngModel.NgModelController * @methodOf ng.directive:ngModel.NgModelController
* *
* @description * @description
* Change the validity state, and notifies the form when the control changes validity. (i.e. it * Change the validity state, and notifies the form when the control changes validity. (i.e. it
@ -950,15 +950,15 @@ var NgModelController = ['$scope', '$exceptionHandler', '$attrs', '$element', '$
/** /**
* @ngdoc function * @ngdoc function
* @name angular.module.ng.$compileProvider.directive.ngModel.NgModelController#$setViewValue * @name ng.directive:ngModel.NgModelController#$setViewValue
* @methodOf angular.module.ng.$compileProvider.directive.ngModel.NgModelController * @methodOf ng.directive:ngModel.NgModelController
* *
* @description * @description
* Read a value from view. * Read a value from view.
* *
* This method should be called from within a DOM event handler. * This method should be called from within a DOM event handler.
* For example {@link angular.module.ng.$compileProvider.directive.input input} or * For example {@link ng.directive:input input} or
* {@link angular.module.ng.$compileProvider.directive.select select} directives call it. * {@link ng.directive:select select} directives call it.
* *
* It internally calls all `formatters` and if resulted value is valid, updates the model and * It internally calls all `formatters` and if resulted value is valid, updates the model and
* calls all registered change listeners. * calls all registered change listeners.
@ -1018,7 +1018,7 @@ var NgModelController = ['$scope', '$exceptionHandler', '$attrs', '$element', '$
/** /**
* @ngdoc directive * @ngdoc directive
* @name angular.module.ng.$compileProvider.directive.ngModel * @name ng.directive:ngModel
* *
* @element input * @element input
* *
@ -1033,19 +1033,19 @@ var NgModelController = ['$scope', '$exceptionHandler', '$attrs', '$element', '$
* - providing validation behavior (i.e. required, number, email, url), * - providing validation behavior (i.e. required, number, email, url),
* - keeping state of the control (valid/invalid, dirty/pristine, validation errors), * - keeping state of the control (valid/invalid, dirty/pristine, validation errors),
* - setting related css class onto the element (`ng-valid`, `ng-invalid`, `ng-dirty`, `ng-pristine`), * - setting related css class onto the element (`ng-valid`, `ng-invalid`, `ng-dirty`, `ng-pristine`),
* - register the control with parent {@link angular.module.ng.$compileProvider.directive.form form}. * - register the control with parent {@link ng.directive:form form}.
* *
* For basic examples, how to use `ngModel`, see: * For basic examples, how to use `ngModel`, see:
* *
* - {@link angular.module.ng.$compileProvider.directive.input input} * - {@link ng.directive:input input}
* - {@link angular.module.ng.$compileProvider.directive.input.text text} * - {@link ng.directive:input.text text}
* - {@link angular.module.ng.$compileProvider.directive.input.checkbox checkbox} * - {@link ng.directive:input.checkbox checkbox}
* - {@link angular.module.ng.$compileProvider.directive.input.radio radio} * - {@link ng.directive:input.radio radio}
* - {@link angular.module.ng.$compileProvider.directive.input.number number} * - {@link ng.directive:input.number number}
* - {@link angular.module.ng.$compileProvider.directive.input.email email} * - {@link ng.directive:input.email email}
* - {@link angular.module.ng.$compileProvider.directive.input.url url} * - {@link ng.directive:input.url url}
* - {@link angular.module.ng.$compileProvider.directive.select select} * - {@link ng.directive:select select}
* - {@link angular.module.ng.$compileProvider.directive.textarea textarea} * - {@link ng.directive:textarea textarea}
* *
*/ */
var ngModelDirective = function() { var ngModelDirective = function() {
@ -1070,7 +1070,7 @@ var ngModelDirective = function() {
/** /**
* @ngdoc directive * @ngdoc directive
* @name angular.module.ng.$compileProvider.directive.ngChange * @name ng.directive:ngChange
* @restrict E * @restrict E
* *
* @description * @description
@ -1156,7 +1156,7 @@ var requiredDirective = function() {
/** /**
* @ngdoc directive * @ngdoc directive
* @name angular.module.ng.$compileProvider.directive.ngList * @name ng.directive:ngList
* *
* @description * @description
* Text input that converts between comma-seperated string into an array of strings. * Text input that converts between comma-seperated string into an array of strings.

View file

@ -2,7 +2,7 @@
/** /**
* @ngdoc directive * @ngdoc directive
* @name angular.module.ng.$compileProvider.directive.ngBind * @name ng.directive:ngBind
* *
* @description * @description
* The `ngBind` attribute tells Angular to replace the text content of the specified HTML element * The `ngBind` attribute tells Angular to replace the text content of the specified HTML element
@ -18,7 +18,7 @@
* bindings invisible to the user while the page is loading. * bindings invisible to the user while the page is loading.
* *
* An alternative solution to this problem would be using the * An alternative solution to this problem would be using the
* {@link angular.module.ng.$compileProvider.directive.ngCloak ngCloak} directive. * {@link ng.directive:ngCloak ngCloak} directive.
* *
* *
* @element ANY * @element ANY
@ -57,7 +57,7 @@ var ngBindDirective = ngDirective(function(scope, element, attr) {
/** /**
* @ngdoc directive * @ngdoc directive
* @name angular.module.ng.$compileProvider.directive.ngBindTemplate * @name ng.directive:ngBindTemplate
* *
* @description * @description
* The `ngBindTemplate` directive specifies that the element * The `ngBindTemplate` directive specifies that the element
@ -116,15 +116,15 @@ var ngBindTemplateDirective = ['$interpolate', function($interpolate) {
/** /**
* @ngdoc directive * @ngdoc directive
* @name angular.module.ng.$compileProvider.directive.ngBindHtmlUnsafe * @name ng.directive:ngBindHtmlUnsafe
* *
* @description * @description
* Creates a binding that will innerHTML the result of evaluating the `expression` into the current * Creates a binding that will innerHTML the result of evaluating the `expression` into the current
* element. *The innerHTML-ed content will not be sanitized!* You should use this directive only if * element. *The innerHTML-ed content will not be sanitized!* You should use this directive only if
* {@link angular.module.ngSanitize.directive.ngBindHtml ngBindHtml} directive is too * {@link ngSanitize.directive:ngBindHtml ngBindHtml} directive is too
* restrictive and when you absolutely trust the source of the content you are binding to. * restrictive and when you absolutely trust the source of the content you are binding to.
* *
* See {@link angular.module.ngSanitize.$sanitize $sanitize} docs for examples. * See {@link ngSanitize.$sanitize $sanitize} docs for examples.
* *
* @element ANY * @element ANY
* @param {expression} ngBindHtmlUnsafe {@link guide/expression Expression} to evaluate. * @param {expression} ngBindHtmlUnsafe {@link guide/expression Expression} to evaluate.

View file

@ -19,7 +19,7 @@ function classDirective(name, selector) {
/** /**
* @ngdoc directive * @ngdoc directive
* @name angular.module.ng.$compileProvider.directive.ngClass * @name ng.directive:ngClass
* *
* @description * @description
* The `ngClass` allows you to set CSS class on HTML element dynamically by databinding an * The `ngClass` allows you to set CSS class on HTML element dynamically by databinding an
@ -70,15 +70,15 @@ var ngClassDirective = classDirective('', true);
/** /**
* @ngdoc directive * @ngdoc directive
* @name angular.module.ng.$compileProvider.directive.ngClassOdd * @name ng.directive:ngClassOdd
* *
* @description * @description
* The `ngClassOdd` and `ngClassEven` directives work exactly as * The `ngClassOdd` and `ngClassEven` directives work exactly as
* {@link angular.module.ng.$compileProvider.directive.ngClass ngClass}, except it works in * {@link ng.directive:ngClass ngClass}, except it works in
* conjunction with `ngRepeat` and takes affect only on odd (even) rows. * conjunction with `ngRepeat` and takes affect only on odd (even) rows.
* *
* This directive can be applied only within a scope of an * This directive can be applied only within a scope of an
* {@link angular.module.ng.$compileProvider.directive.ngRepeat ngRepeat}. * {@link ng.directive:ngRepeat ngRepeat}.
* *
* @element ANY * @element ANY
* @param {expression} ngClassOdd {@link guide/expression Expression} to eval. The result * @param {expression} ngClassOdd {@link guide/expression Expression} to eval. The result
@ -117,15 +117,15 @@ var ngClassOddDirective = classDirective('Odd', 0);
/** /**
* @ngdoc directive * @ngdoc directive
* @name angular.module.ng.$compileProvider.directive.ngClassEven * @name ng.directive:ngClassEven
* *
* @description * @description
* The `ngClassOdd` and `ngClassEven` works exactly as * The `ngClassOdd` and `ngClassEven` works exactly as
* {@link angular.module.ng.$compileProvider.directive.ngClass ngClass}, except it works in * {@link ng.directive:ngClass ngClass}, except it works in
* conjunction with `ngRepeat` and takes affect only on odd (even) rows. * conjunction with `ngRepeat` and takes affect only on odd (even) rows.
* *
* This directive can be applied only within a scope of an * This directive can be applied only within a scope of an
* {@link angular.module.ng.$compileProvider.directive.ngRepeat ngRepeat}. * {@link ng.directive:ngRepeat ngRepeat}.
* *
* @element ANY * @element ANY
* @param {expression} ngClassEven {@link guide/expression Expression} to eval. The * @param {expression} ngClassEven {@link guide/expression Expression} to eval. The

View file

@ -2,7 +2,7 @@
/** /**
* @ngdoc directive * @ngdoc directive
* @name angular.module.ng.$compileProvider.directive.ngCloak * @name ng.directive:ngCloak
* *
* @description * @description
* The `ngCloak` directive is used to prevent the Angular html template from being briefly * The `ngCloak` directive is used to prevent the Angular html template from being briefly

View file

@ -2,7 +2,7 @@
/** /**
* @ngdoc directive * @ngdoc directive
* @name angular.module.ng.$compileProvider.directive.ngController * @name ng.directive:ngController
* *
* @description * @description
* The `ngController` directive assigns behavior to a scope. This is a key aspect of how angular * The `ngController` directive assigns behavior to a scope. This is a key aspect of how angular
@ -15,7 +15,7 @@
* * Controller The `ngController` directive specifies a Controller class; the class has * * Controller The `ngController` directive specifies a Controller class; the class has
* methods that typically express the business logic behind the application. * methods that typically express the business logic behind the application.
* *
* Note that an alternative way to define controllers is via the `{@link angular.module.ng.$route}` * Note that an alternative way to define controllers is via the `{@link ng.$route}`
* service. * service.
* *
* @element ANY * @element ANY

View file

@ -2,13 +2,13 @@
/** /**
* @ngdoc directive * @ngdoc directive
* @name angular.module.ng.$compileProvider.directive.ngCsp * @name ng.directive:ngCsp
* @priority 1000 * @priority 1000
* *
* @description * @description
* Enables [CSP (Content Security Policy)](https://developer.mozilla.org/en/Security/CSP) support. * Enables [CSP (Content Security Policy)](https://developer.mozilla.org/en/Security/CSP) support.
* This directive should be used on the root element of the application (typically the `<html>` * This directive should be used on the root element of the application (typically the `<html>`
* element or other element with the {@link angular.module.ng.$compileProvider.directive.ngApp ngApp} * element or other element with the {@link ng.directive:ngApp ngApp}
* directive). * directive).
* *
* If enabled the performance of template expression evaluator will suffer slightly, so don't enable * If enabled the performance of template expression evaluator will suffer slightly, so don't enable

View file

@ -2,7 +2,7 @@
/** /**
* @ngdoc directive * @ngdoc directive
* @name angular.module.ng.$compileProvider.directive.ngClick * @name ng.directive:ngClick
* *
* @description * @description
* The ngClick allows you to specify custom behavior when * The ngClick allows you to specify custom behavior when
@ -55,7 +55,7 @@ forEach(
/** /**
* @ngdoc directive * @ngdoc directive
* @name angular.module.ng.$compileProvider.directive.ngDblclick * @name ng.directive:ngDblclick
* *
* @description * @description
* The `ngDblclick` directive allows you to specify custom behavior on dblclick event. * The `ngDblclick` directive allows you to specify custom behavior on dblclick event.
@ -65,13 +65,13 @@ forEach(
* dblclick. (Event object is available as `$event`) * dblclick. (Event object is available as `$event`)
* *
* @example * @example
* See {@link angular.module.ng.$compileProvider.directive.ngClick ngClick} * See {@link ng.directive:ngClick ngClick}
*/ */
/** /**
* @ngdoc directive * @ngdoc directive
* @name angular.module.ng.$compileProvider.directive.ngMousedown * @name ng.directive:ngMousedown
* *
* @description * @description
* The ngMousedown directive allows you to specify custom behavior on mousedown event. * The ngMousedown directive allows you to specify custom behavior on mousedown event.
@ -81,13 +81,13 @@ forEach(
* mousedown. (Event object is available as `$event`) * mousedown. (Event object is available as `$event`)
* *
* @example * @example
* See {@link angular.module.ng.$compileProvider.directive.ngClick ngClick} * See {@link ng.directive:ngClick ngClick}
*/ */
/** /**
* @ngdoc directive * @ngdoc directive
* @name angular.module.ng.$compileProvider.directive.ngMouseup * @name ng.directive:ngMouseup
* *
* @description * @description
* Specify custom behavior on mouseup event. * Specify custom behavior on mouseup event.
@ -97,12 +97,12 @@ forEach(
* mouseup. (Event object is available as `$event`) * mouseup. (Event object is available as `$event`)
* *
* @example * @example
* See {@link angular.module.ng.$compileProvider.directive.ngClick ngClick} * See {@link ng.directive:ngClick ngClick}
*/ */
/** /**
* @ngdoc directive * @ngdoc directive
* @name angular.module.ng.$compileProvider.directive.ngMouseover * @name ng.directive:ngMouseover
* *
* @description * @description
* Specify custom behavior on mouseover event. * Specify custom behavior on mouseover event.
@ -112,13 +112,13 @@ forEach(
* mouseover. (Event object is available as `$event`) * mouseover. (Event object is available as `$event`)
* *
* @example * @example
* See {@link angular.module.ng.$compileProvider.directive.ngClick ngClick} * See {@link ng.directive:ngClick ngClick}
*/ */
/** /**
* @ngdoc directive * @ngdoc directive
* @name angular.module.ng.$compileProvider.directive.ngMouseenter * @name ng.directive:ngMouseenter
* *
* @description * @description
* Specify custom behavior on mouseenter event. * Specify custom behavior on mouseenter event.
@ -128,13 +128,13 @@ forEach(
* mouseenter. (Event object is available as `$event`) * mouseenter. (Event object is available as `$event`)
* *
* @example * @example
* See {@link angular.module.ng.$compileProvider.directive.ngClick ngClick} * See {@link ng.directive:ngClick ngClick}
*/ */
/** /**
* @ngdoc directive * @ngdoc directive
* @name angular.module.ng.$compileProvider.directive.ngMouseleave * @name ng.directive:ngMouseleave
* *
* @description * @description
* Specify custom behavior on mouseleave event. * Specify custom behavior on mouseleave event.
@ -144,13 +144,13 @@ forEach(
* mouseleave. (Event object is available as `$event`) * mouseleave. (Event object is available as `$event`)
* *
* @example * @example
* See {@link angular.module.ng.$compileProvider.directive.ngClick ngClick} * See {@link ng.directive:ngClick ngClick}
*/ */
/** /**
* @ngdoc directive * @ngdoc directive
* @name angular.module.ng.$compileProvider.directive.ngMousemove * @name ng.directive:ngMousemove
* *
* @description * @description
* Specify custom behavior on mousemove event. * Specify custom behavior on mousemove event.
@ -160,13 +160,13 @@ forEach(
* mousemove. (Event object is available as `$event`) * mousemove. (Event object is available as `$event`)
* *
* @example * @example
* See {@link angular.module.ng.$compileProvider.directive.ngClick ngClick} * See {@link ng.directive:ngClick ngClick}
*/ */
/** /**
* @ngdoc directive * @ngdoc directive
* @name angular.module.ng.$compileProvider.directive.ngSubmit * @name ng.directive:ngSubmit
* *
* @description * @description
* Enables binding angular expressions to onsubmit events. * Enables binding angular expressions to onsubmit events.

View file

@ -2,7 +2,7 @@
/** /**
* @ngdoc directive * @ngdoc directive
* @name angular.module.ng.$compileProvider.directive.ngInclude * @name ng.directive:ngInclude
* @restrict ECA * @restrict ECA
* *
* @description * @description
@ -18,7 +18,7 @@
* make sure you wrap it in quotes, e.g. `src="'myPartialTemplate.html'"`. * make sure you wrap it in quotes, e.g. `src="'myPartialTemplate.html'"`.
* @param {string=} onload Expression to evaluate when a new partial is loaded. * @param {string=} onload Expression to evaluate when a new partial is loaded.
* *
* @param {string=} autoscroll Whether `ngInclude` should call {@link angular.module.ng.$anchorScroll * @param {string=} autoscroll Whether `ngInclude` should call {@link ng.$anchorScroll
* $anchorScroll} to scroll the viewport after the content is loaded. * $anchorScroll} to scroll the viewport after the content is loaded.
* *
* - If the attribute is not set, disable scrolling. * - If the attribute is not set, disable scrolling.
@ -72,8 +72,8 @@
/** /**
* @ngdoc event * @ngdoc event
* @name angular.module.ng.$compileProvider.directive.ngInclude#$includeContentLoaded * @name ng.directive:ngInclude#$includeContentLoaded
* @eventOf angular.module.ng.$compileProvider.directive.ngInclude * @eventOf ng.directive:ngInclude
* @eventType emit on the current ngInclude scope * @eventType emit on the current ngInclude scope
* @description * @description
* Emitted every time the ngInclude content is reloaded. * Emitted every time the ngInclude content is reloaded.

View file

@ -2,7 +2,7 @@
/** /**
* @ngdoc directive * @ngdoc directive
* @name angular.module.ng.$compileProvider.directive.ngInit * @name ng.directive:ngInit
* *
* @description * @description
* The `ngInit` directive specifies initialization tasks to be executed * The `ngInit` directive specifies initialization tasks to be executed

View file

@ -2,7 +2,7 @@
/** /**
* @ngdoc directive * @ngdoc directive
* @name angular.module.ng.$compileProvider.directive.ngNonBindable * @name ng.directive:ngNonBindable
* @priority 1000 * @priority 1000
* *
* @description * @description

View file

@ -2,7 +2,7 @@
/** /**
* @ngdoc directive * @ngdoc directive
* @name angular.module.ng.$compileProvider.directive.ngPluralize * @name ng.directive:ngPluralize
* @restrict EA * @restrict EA
* *
* @description * @description

View file

@ -2,7 +2,7 @@
/** /**
* @ngdoc directive * @ngdoc directive
* @name angular.module.ng.$compileProvider.directive.ngRepeat * @name ng.directive:ngRepeat
* *
* @description * @description
* The `ngRepeat` directive instantiates a template once per item from a collection. Each template * The `ngRepeat` directive instantiates a template once per item from a collection. Each template

View file

@ -2,7 +2,7 @@
/** /**
* @ngdoc directive * @ngdoc directive
* @name angular.module.ng.$compileProvider.directive.ngShow * @name ng.directive:ngShow
* *
* @description * @description
* The `ngShow` and `ngHide` directives show or hide a portion of the DOM tree (HTML) * The `ngShow` and `ngHide` directives show or hide a portion of the DOM tree (HTML)
@ -42,7 +42,7 @@ var ngShowDirective = ngDirective(function(scope, element, attr){
/** /**
* @ngdoc directive * @ngdoc directive
* @name angular.module.ng.$compileProvider.directive.ngHide * @name ng.directive:ngHide
* *
* @description * @description
* The `ngHide` and `ngShow` directives hide or show a portion * The `ngHide` and `ngShow` directives hide or show a portion

View file

@ -2,7 +2,7 @@
/** /**
* @ngdoc directive * @ngdoc directive
* @name angular.module.ng.$compileProvider.directive.ngStyle * @name ng.directive:ngStyle
* *
* @description * @description
* The `ngStyle` directive allows you to set CSS style on an HTML element conditionally. * The `ngStyle` directive allows you to set CSS style on an HTML element conditionally.

View file

@ -2,7 +2,7 @@
/** /**
* @ngdoc directive * @ngdoc directive
* @name angular.module.ng.$compileProvider.directive.ngSwitch * @name ng.directive:ngSwitch
* @restrict EA * @restrict EA
* *
* @description * @description

View file

@ -2,7 +2,7 @@
/** /**
* @ngdoc directive * @ngdoc directive
* @name angular.module.ng.$compileProvider.directive.ngTransclude * @name ng.directive:ngTransclude
* *
* @description * @description
* Insert the transcluded DOM here. * Insert the transcluded DOM here.

View file

@ -2,12 +2,12 @@
/** /**
* @ngdoc directive * @ngdoc directive
* @name angular.module.ng.$compileProvider.directive.ngView * @name ng.directive:ngView
* @restrict ECA * @restrict ECA
* *
* @description * @description
* # Overview * # Overview
* `ngView` is a directive that complements the {@link angular.module.ng.$route $route} service by * `ngView` is a directive that complements the {@link ng.$route $route} service by
* including the rendered template of the current route into the main layout (`index.html`) file. * including the rendered template of the current route into the main layout (`index.html`) file.
* Every time the current route changes, the included view changes with it according to the * Every time the current route changes, the included view changes with it according to the
* configuration of the `$route` service. * configuration of the `$route` service.
@ -98,8 +98,8 @@
/** /**
* @ngdoc event * @ngdoc event
* @name angular.module.ng.$compileProvider.directive.ngView#$viewContentLoaded * @name ng.directive:ngView#$viewContentLoaded
* @eventOf angular.module.ng.$compileProvider.directive.ngView * @eventOf ng.directive:ngView
* @eventType emit on the current ngView scope * @eventType emit on the current ngView scope
* @description * @description
* Emitted every time the ngView content is reloaded. * Emitted every time the ngView content is reloaded.

View file

@ -2,7 +2,7 @@
/** /**
* @ngdoc directive * @ngdoc directive
* @name angular.module.ng.$compileProvider.directive.script * @name ng.directive:script
* *
* @description * @description
* Load content of a script tag, with type `text/ng-template`, into `$templateCache`, so that the * Load content of a script tag, with type `text/ng-template`, into `$templateCache`, so that the

View file

@ -2,7 +2,7 @@
/** /**
* @ngdoc directive * @ngdoc directive
* @name angular.module.ng.$compileProvider.directive.select * @name ng.directive:select
* @restrict E * @restrict E
* *
* @description * @description
@ -23,7 +23,7 @@
* option. See example below for demonstration. * option. See example below for demonstration.
* *
* Note: `ngOptions` provides iterator facility for `<option>` element which should be used instead * Note: `ngOptions` provides iterator facility for `<option>` element which should be used instead
* of {@link angular.module.ng.$compileProvider.directive.ngRepeat ngRepeat} when you want the * of {@link ng.directive:ngRepeat ngRepeat} when you want the
* `select` model to be bound to a non-string value. This is because an option element can currently * `select` model to be bound to a non-string value. This is because an option element can currently
* be bound to string values only. * be bound to string values only.
* *

View file

@ -2,7 +2,7 @@
/** /**
* @ngdoc object * @ngdoc object
* @name angular.module.ng.$document * @name ng.$document
* @requires $window * @requires $window
* *
* @description * @description

View file

@ -2,7 +2,7 @@
/** /**
* @ngdoc function * @ngdoc function
* @name angular.module.ng.$exceptionHandler * @name ng.$exceptionHandler
* @requires $log * @requires $log
* *
* @description * @description
@ -11,7 +11,7 @@
* the browser console. * the browser console.
* *
* In unit tests, if `angular-mocks.js` is loaded, this service is overridden by * In unit tests, if `angular-mocks.js` is loaded, this service is overridden by
* {@link angular.module.ngMock.$exceptionHandler mock $exceptionHandler} * {@link ngMock.$exceptionHandler mock $exceptionHandler}
* *
* @param {Error} exception Exception associated with the error. * @param {Error} exception Exception associated with the error.
* @param {string=} cause optional information about the context in which * @param {string=} cause optional information about the context in which

View file

@ -2,7 +2,7 @@
/** /**
* @ngdoc object * @ngdoc object
* @name angular.module.ng.$filterProvider * @name ng.$filterProvider
* @description * @description
* *
* Filters are just functions which transform input to an output. However filters need to be Dependency Injected. To * Filters are just functions which transform input to an output. However filters need to be Dependency Injected. To
@ -50,8 +50,8 @@
*/ */
/** /**
* @ngdoc method * @ngdoc method
* @name angular.module.ng.$filterProvider#register * @name ng.$filterProvider#register
* @methodOf angular.module.ng.$filterProvider * @methodOf ng.$filterProvider
* @description * @description
* Register filter factory function. * Register filter factory function.
* *
@ -62,7 +62,7 @@
/** /**
* @ngdoc function * @ngdoc function
* @name angular.module.ng.$filter * @name ng.$filter
* @function * @function
* @description * @description
* Filters are used for formatting data displayed to the user. * Filters are used for formatting data displayed to the user.

View file

@ -2,14 +2,14 @@
/** /**
* @ngdoc filter * @ngdoc filter
* @name angular.module.ng.$filter.filter * @name ng.filter:filter
* @function * @function
* *
* @description * @description
* Selects a subset of items from `array` and returns it as a new array. * Selects a subset of items from `array` and returns it as a new array.
* *
* Note: This function is used to augment the `Array` type in Angular expressions. See * Note: This function is used to augment the `Array` type in Angular expressions. See
* {@link angular.module.ng.$filter} for more information about Angular arrays. * {@link ng.$filter} for more information about Angular arrays.
* *
* @param {Array} array The source array. * @param {Array} array The source array.
* @param {string|Object|function()} expression The predicate to be used for selecting items from * @param {string|Object|function()} expression The predicate to be used for selecting items from

View file

@ -2,7 +2,7 @@
/** /**
* @ngdoc filter * @ngdoc filter
* @name angular.module.ng.$filter.currency * @name ng.filter:currency
* @function * @function
* *
* @description * @description
@ -53,7 +53,7 @@ function currencyFilter($locale) {
/** /**
* @ngdoc filter * @ngdoc filter
* @name angular.module.ng.$filter.number * @name ng.filter:number
* @function * @function
* *
* @description * @description
@ -239,7 +239,7 @@ var DATE_FORMATS_SPLIT = /((?:[^yMdHhmsaZE']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+
/** /**
* @ngdoc filter * @ngdoc filter
* @name angular.module.ng.$filter.date * @name ng.filter:date
* @function * @function
* *
* @description * @description
@ -386,7 +386,7 @@ function dateFilter($locale) {
/** /**
* @ngdoc filter * @ngdoc filter
* @name angular.module.ng.$filter.json * @name ng.filter:json
* @function * @function
* *
* @description * @description
@ -421,7 +421,7 @@ function jsonFilter() {
/** /**
* @ngdoc filter * @ngdoc filter
* @name angular.module.ng.$filter.lowercase * @name ng.filter:lowercase
* @function * @function
* @description * @description
* Converts string to lowercase. * Converts string to lowercase.
@ -432,7 +432,7 @@ var lowercaseFilter = valueFn(lowercase);
/** /**
* @ngdoc filter * @ngdoc filter
* @name angular.module.ng.$filter.uppercase * @name ng.filter:uppercase
* @function * @function
* @description * @description
* Converts string to uppercase. * Converts string to uppercase.

View file

@ -2,7 +2,7 @@
/** /**
* @ngdoc function * @ngdoc function
* @name angular.module.ng.$filter.limitTo * @name ng.filter:limitTo
* @function * @function
* *
* @description * @description
@ -11,7 +11,7 @@
* value and sign (positive or negative) of `limit`. * value and sign (positive or negative) of `limit`.
* *
* Note: This function is used to augment the `Array` type in Angular expressions. See * Note: This function is used to augment the `Array` type in Angular expressions. See
* {@link angular.module.ng.$filter} for more information about Angular arrays. * {@link ng.$filter} for more information about Angular arrays.
* *
* @param {Array} array Source array to be limited. * @param {Array} array Source array to be limited.
* @param {string|Number} limit The length of the returned array. If the `limit` number is * @param {string|Number} limit The length of the returned array. If the `limit` number is

View file

@ -2,14 +2,14 @@
/** /**
* @ngdoc function * @ngdoc function
* @name angular.module.ng.$filter.orderBy * @name ng.filter:orderBy
* @function * @function
* *
* @description * @description
* Orders a specified `array` by the `expression` predicate. * Orders a specified `array` by the `expression` predicate.
* *
* Note: this function is used to augment the `Array` type in Angular expressions. See * Note: this function is used to augment the `Array` type in Angular expressions. See
* {@link angular.module.ng.$filter} for more informaton about Angular arrays. * {@link ng.$filter} for more informaton about Angular arrays.
* *
* @param {Array} array The array to sort. * @param {Array} array The array to sort.
* @param {function(*)|string|Array.<(function(*)|string)>} expression A predicate to be * @param {function(*)|string|Array.<(function(*)|string)>} expression A predicate to be

View file

@ -135,7 +135,7 @@ function $HttpProvider() {
/** /**
* @ngdoc function * @ngdoc function
* @name angular.module.ng.$http * @name ng.$http
* @requires $httpBacked * @requires $httpBacked
* @requires $browser * @requires $browser
* @requires $cacheFactory * @requires $cacheFactory
@ -149,19 +149,19 @@ function $HttpProvider() {
* XMLHttpRequest} object or via {@link http://en.wikipedia.org/wiki/JSONP JSONP}. * XMLHttpRequest} object or via {@link http://en.wikipedia.org/wiki/JSONP JSONP}.
* *
* For unit testing applications that use `$http` service, see * For unit testing applications that use `$http` service, see
* {@link angular.module.ngMock.$httpBackend $httpBackend mock}. * {@link ngMock.$httpBackend $httpBackend mock}.
* *
* For a higher level of abstraction, please check out the {@link angular.module.ngResource.$resource * For a higher level of abstraction, please check out the {@link ngResource.$resource
* $resource} service. * $resource} service.
* *
* The $http API is based on the {@link angular.module.ng.$q deferred/promise APIs} exposed by * The $http API is based on the {@link ng.$q deferred/promise APIs} exposed by
* the $q service. While for simple usage patters this doesn't matter much, for advanced usage, * the $q service. While for simple usage patters this doesn't matter much, for advanced usage,
* it is important to familiarize yourself with these apis and guarantees they provide. * it is important to familiarize yourself with these apis and guarantees they provide.
* *
* *
* # General usage * # General usage
* The `$http` service is a function which takes a single argument a configuration object * The `$http` service is a function which takes a single argument a configuration object
* that is used to generate an http request and returns a {@link angular.module.ng.$q promise} * that is used to generate an http request and returns a {@link ng.$q promise}
* with two $http specific methods: `success` and `error`. * with two $http specific methods: `success` and `error`.
* *
* <pre> * <pre>
@ -196,12 +196,12 @@ function $HttpProvider() {
* *
* Complete list of shortcut methods: * Complete list of shortcut methods:
* *
* - {@link angular.module.ng.$http#get $http.get} * - {@link ng.$http#get $http.get}
* - {@link angular.module.ng.$http#head $http.head} * - {@link ng.$http#head $http.head}
* - {@link angular.module.ng.$http#post $http.post} * - {@link ng.$http#post $http.post}
* - {@link angular.module.ng.$http#put $http.put} * - {@link ng.$http#put $http.put}
* - {@link angular.module.ng.$http#delete $http.delete} * - {@link ng.$http#delete $http.delete}
* - {@link angular.module.ng.$http#jsonp $http.jsonp} * - {@link ng.$http#jsonp $http.jsonp}
* *
* *
* # Setting HTTP Headers * # Setting HTTP Headers
@ -265,18 +265,18 @@ function $HttpProvider() {
* # Response interceptors * # Response interceptors
* *
* Before you start creating interceptors, be sure to understand the * Before you start creating interceptors, be sure to understand the
* {@link angular.module.ng.$q $q and deferred/promise APIs}. * {@link ng.$q $q and deferred/promise APIs}.
* *
* For purposes of global error handling, authentication or any kind of synchronous or * For purposes of global error handling, authentication or any kind of synchronous or
* asynchronous preprocessing of received responses, it is desirable to be able to intercept * asynchronous preprocessing of received responses, it is desirable to be able to intercept
* responses for http requests before they are handed over to the application code that * responses for http requests before they are handed over to the application code that
* initiated these requests. The response interceptors leverage the {@link angular.module.ng.$q * initiated these requests. The response interceptors leverage the {@link ng.$q
* promise apis} to fulfil this need for both synchronous and asynchronous preprocessing. * promise apis} to fulfil this need for both synchronous and asynchronous preprocessing.
* *
* The interceptors are service factories that are registered with the $httpProvider by * The interceptors are service factories that are registered with the $httpProvider by
* adding them to the `$httpProvider.responseInterceptors` array. The factory is called and * adding them to the `$httpProvider.responseInterceptors` array. The factory is called and
* injected with dependencies (if specified) and returns the interceptor a function that * injected with dependencies (if specified) and returns the interceptor a function that
* takes a {@link angular.module.ng.$q promise} and returns the original or a new promise. * takes a {@link ng.$q promise} and returns the original or a new promise.
* *
* <pre> * <pre>
* // register the interceptor as a service * // register the interceptor as a service
@ -375,14 +375,14 @@ function $HttpProvider() {
* response body and headers and returns its transformed (typically deserialized) version. * response body and headers and returns its transformed (typically deserialized) version.
* - **cache** `{boolean|Cache}` If true, a default $http cache will be used to cache the * - **cache** `{boolean|Cache}` If true, a default $http cache will be used to cache the
* GET request, otherwise if a cache instance built with * GET request, otherwise if a cache instance built with
* {@link angular.module.ng.$cacheFactory $cacheFactory}, this cache will be used for * {@link ng.$cacheFactory $cacheFactory}, this cache will be used for
* caching. * caching.
* - **timeout** `{number}` timeout in milliseconds. * - **timeout** `{number}` timeout in milliseconds.
* - **withCredentials** - `{boolean}` - whether to to set the `withCredentials` flag on the * - **withCredentials** - `{boolean}` - whether to to set the `withCredentials` flag on the
* XHR object. See {@link https://developer.mozilla.org/en/http_access_control#section_5 * XHR object. See {@link https://developer.mozilla.org/en/http_access_control#section_5
* requests with credentials} for more information. * requests with credentials} for more information.
* *
* @returns {HttpPromise} Returns a {@link angular.module.ng.$q promise} object with the * @returns {HttpPromise} Returns a {@link ng.$q promise} object with the
* standard `then` method and two http specific methods: `success` and `error`. The `then` * standard `then` method and two http specific methods: `success` and `error`. The `then`
* method takes two arguments a success and an error callback which will be called with a * method takes two arguments a success and an error callback which will be called with a
* response object. The `success` and `error` methods take a single argument - a function that * response object. The `success` and `error` methods take a single argument - a function that
@ -529,8 +529,8 @@ function $HttpProvider() {
/** /**
* @ngdoc method * @ngdoc method
* @name angular.module.ng.$http#get * @name ng.$http#get
* @methodOf angular.module.ng.$http * @methodOf ng.$http
* *
* @description * @description
* Shortcut method to perform `GET` request * Shortcut method to perform `GET` request
@ -542,8 +542,8 @@ function $HttpProvider() {
/** /**
* @ngdoc method * @ngdoc method
* @name angular.module.ng.$http#delete * @name ng.$http#delete
* @methodOf angular.module.ng.$http * @methodOf ng.$http
* *
* @description * @description
* Shortcut method to perform `DELETE` request * Shortcut method to perform `DELETE` request
@ -555,8 +555,8 @@ function $HttpProvider() {
/** /**
* @ngdoc method * @ngdoc method
* @name angular.module.ng.$http#head * @name ng.$http#head
* @methodOf angular.module.ng.$http * @methodOf ng.$http
* *
* @description * @description
* Shortcut method to perform `HEAD` request * Shortcut method to perform `HEAD` request
@ -568,8 +568,8 @@ function $HttpProvider() {
/** /**
* @ngdoc method * @ngdoc method
* @name angular.module.ng.$http#jsonp * @name ng.$http#jsonp
* @methodOf angular.module.ng.$http * @methodOf ng.$http
* *
* @description * @description
* Shortcut method to perform `JSONP` request * Shortcut method to perform `JSONP` request
@ -583,8 +583,8 @@ function $HttpProvider() {
/** /**
* @ngdoc method * @ngdoc method
* @name angular.module.ng.$http#post * @name ng.$http#post
* @methodOf angular.module.ng.$http * @methodOf ng.$http
* *
* @description * @description
* Shortcut method to perform `POST` request * Shortcut method to perform `POST` request
@ -597,8 +597,8 @@ function $HttpProvider() {
/** /**
* @ngdoc method * @ngdoc method
* @name angular.module.ng.$http#put * @name ng.$http#put
* @methodOf angular.module.ng.$http * @methodOf ng.$http
* *
* @description * @description
* Shortcut method to perform `PUT` request * Shortcut method to perform `PUT` request
@ -612,8 +612,8 @@ function $HttpProvider() {
/** /**
* @ngdoc property * @ngdoc property
* @name angular.module.ng.$http#defaults * @name ng.$http#defaults
* @propertyOf angular.module.ng.$http * @propertyOf ng.$http
* *
* @description * @description
* Runtime equivalent of the `$httpProvider.defaults` property. Allows configuration of * Runtime equivalent of the `$httpProvider.defaults` property. Allows configuration of

View file

@ -8,19 +8,19 @@ var XHR = window.XMLHttpRequest || function() {
/** /**
* @ngdoc object * @ngdoc object
* @name angular.module.ng.$httpBackend * @name ng.$httpBackend
* @requires $browser * @requires $browser
* @requires $window * @requires $window
* @requires $document * @requires $document
* *
* @description * @description
* HTTP backend used by the {@link angular.module.ng.$http service} that delegates to * HTTP backend used by the {@link ng.$http service} that delegates to
* XMLHttpRequest object or JSONP and deals with browser incompatibilities. * XMLHttpRequest object or JSONP and deals with browser incompatibilities.
* *
* You should never need to use this service directly, instead use the higher-level abstractions: * You should never need to use this service directly, instead use the higher-level abstractions:
* {@link angular.module.ng.$http $http} or {@link angular.module.ngResource.$resource $resource}. * {@link ng.$http $http} or {@link ngResource.$resource $resource}.
* *
* During testing this implementation is swapped with {@link angular.module.ngMock.$httpBackend mock * During testing this implementation is swapped with {@link ngMock.$httpBackend mock
* $httpBackend} which can be trained with responses. * $httpBackend} which can be trained with responses.
*/ */
function $HttpBackendProvider() { function $HttpBackendProvider() {

View file

@ -2,7 +2,7 @@
/** /**
* @ngdoc function * @ngdoc function
* @name angular.module.ng.$interpolateProvider * @name ng.$interpolateProvider
* @function * @function
* *
* @description * @description
@ -15,8 +15,8 @@ function $InterpolateProvider() {
/** /**
* @ngdoc method * @ngdoc method
* @name angular.module.ng.$interpolateProvider#startSymbol * @name ng.$interpolateProvider#startSymbol
* @methodOf angular.module.ng.$interpolateProvider * @methodOf ng.$interpolateProvider
* @description * @description
* Symbol to denote start of expression in the interpolated string. Defaults to `{{`. * Symbol to denote start of expression in the interpolated string. Defaults to `{{`.
* *
@ -33,8 +33,8 @@ function $InterpolateProvider() {
/** /**
* @ngdoc method * @ngdoc method
* @name angular.module.ng.$interpolateProvider#endSymbol * @name ng.$interpolateProvider#endSymbol
* @methodOf angular.module.ng.$interpolateProvider * @methodOf ng.$interpolateProvider
* @description * @description
* Symbol to denote the end of expression in the interpolated string. Defaults to `}}`. * Symbol to denote the end of expression in the interpolated string. Defaults to `}}`.
* *
@ -56,7 +56,7 @@ function $InterpolateProvider() {
/** /**
* @ngdoc function * @ngdoc function
* @name angular.module.ng.$interpolate * @name ng.$interpolate
* @function * @function
* *
* @requires $parse * @requires $parse
@ -64,8 +64,8 @@ function $InterpolateProvider() {
* @description * @description
* *
* Compiles a string with markup into an interpolation function. This service is used by the * Compiles a string with markup into an interpolation function. This service is used by the
* HTML {@link angular.module.ng.$compile $compile} service for data binding. See * HTML {@link ng.$compile $compile} service for data binding. See
* {@link angular.module.ng.$interpolateProvider $interpolateProvider} for configuring the * {@link ng.$interpolateProvider $interpolateProvider} for configuring the
* interpolation markup. * interpolation markup.
* *
* *

View file

@ -2,7 +2,7 @@
/** /**
* @ngdoc object * @ngdoc object
* @name angular.module.ng.$locale * @name ng.$locale
* *
* @description * @description
* $locale service provides localization rules for various Angular components. As of right now the * $locale service provides localization rules for various Angular components. As of right now the

View file

@ -205,8 +205,8 @@ LocationUrl.prototype = {
/** /**
* @ngdoc method * @ngdoc method
* @name angular.module.ng.$location#absUrl * @name ng.$location#absUrl
* @methodOf angular.module.ng.$location * @methodOf ng.$location
* *
* @description * @description
* This method is getter only. * This method is getter only.
@ -220,8 +220,8 @@ LocationUrl.prototype = {
/** /**
* @ngdoc method * @ngdoc method
* @name angular.module.ng.$location#url * @name ng.$location#url
* @methodOf angular.module.ng.$location * @methodOf ng.$location
* *
* @description * @description
* This method is getter / setter. * This method is getter / setter.
@ -247,8 +247,8 @@ LocationUrl.prototype = {
/** /**
* @ngdoc method * @ngdoc method
* @name angular.module.ng.$location#protocol * @name ng.$location#protocol
* @methodOf angular.module.ng.$location * @methodOf ng.$location
* *
* @description * @description
* This method is getter only. * This method is getter only.
@ -261,8 +261,8 @@ LocationUrl.prototype = {
/** /**
* @ngdoc method * @ngdoc method
* @name angular.module.ng.$location#host * @name ng.$location#host
* @methodOf angular.module.ng.$location * @methodOf ng.$location
* *
* @description * @description
* This method is getter only. * This method is getter only.
@ -275,8 +275,8 @@ LocationUrl.prototype = {
/** /**
* @ngdoc method * @ngdoc method
* @name angular.module.ng.$location#port * @name ng.$location#port
* @methodOf angular.module.ng.$location * @methodOf ng.$location
* *
* @description * @description
* This method is getter only. * This method is getter only.
@ -289,8 +289,8 @@ LocationUrl.prototype = {
/** /**
* @ngdoc method * @ngdoc method
* @name angular.module.ng.$location#path * @name ng.$location#path
* @methodOf angular.module.ng.$location * @methodOf ng.$location
* *
* @description * @description
* This method is getter / setter. * This method is getter / setter.
@ -311,8 +311,8 @@ LocationUrl.prototype = {
/** /**
* @ngdoc method * @ngdoc method
* @name angular.module.ng.$location#search * @name ng.$location#search
* @methodOf angular.module.ng.$location * @methodOf ng.$location
* *
* @description * @description
* This method is getter / setter. * This method is getter / setter.
@ -347,8 +347,8 @@ LocationUrl.prototype = {
/** /**
* @ngdoc method * @ngdoc method
* @name angular.module.ng.$location#hash * @name ng.$location#hash
* @methodOf angular.module.ng.$location * @methodOf ng.$location
* *
* @description * @description
* This method is getter / setter. * This method is getter / setter.
@ -364,8 +364,8 @@ LocationUrl.prototype = {
/** /**
* @ngdoc method * @ngdoc method
* @name angular.module.ng.$location#replace * @name ng.$location#replace
* @methodOf angular.module.ng.$location * @methodOf ng.$location
* *
* @description * @description
* If called, all changes to $location during current `$digest` will be replacing current history * If called, all changes to $location during current `$digest` will be replacing current history
@ -401,7 +401,7 @@ function locationGetterSetter(property, preprocess) {
/** /**
* @ngdoc object * @ngdoc object
* @name angular.module.ng.$location * @name ng.$location
* *
* @requires $browser * @requires $browser
* @requires $sniffer * @requires $sniffer
@ -430,7 +430,7 @@ function locationGetterSetter(property, preprocess) {
/** /**
* @ngdoc object * @ngdoc object
* @name angular.module.ng.$locationProvider * @name ng.$locationProvider
* @description * @description
* Use the `$locationProvider` to configure how the application deep linking paths are stored. * Use the `$locationProvider` to configure how the application deep linking paths are stored.
*/ */
@ -440,8 +440,8 @@ function $LocationProvider(){
/** /**
* @ngdoc property * @ngdoc property
* @name angular.module.ng.$locationProvider#hashPrefix * @name ng.$locationProvider#hashPrefix
* @methodOf angular.module.ng.$locationProvider * @methodOf ng.$locationProvider
* @description * @description
* @param {string=} prefix Prefix for hash part (containing path and search) * @param {string=} prefix Prefix for hash part (containing path and search)
* @returns {*} current value if used as getter or itself (chaining) if used as setter * @returns {*} current value if used as getter or itself (chaining) if used as setter
@ -457,8 +457,8 @@ function $LocationProvider(){
/** /**
* @ngdoc property * @ngdoc property
* @name angular.module.ng.$locationProvider#html5Mode * @name ng.$locationProvider#html5Mode
* @methodOf angular.module.ng.$locationProvider * @methodOf ng.$locationProvider
* @description * @description
* @param {string=} mode Use HTML5 strategy if available. * @param {string=} mode Use HTML5 strategy if available.
* @returns {*} current value if used as getter or itself (chaining) if used as setter * @returns {*} current value if used as getter or itself (chaining) if used as setter

View file

@ -2,7 +2,7 @@
/** /**
* @ngdoc object * @ngdoc object
* @name angular.module.ng.$log * @name ng.$log
* @requires $window * @requires $window
* *
* @description * @description
@ -40,8 +40,8 @@ function $LogProvider(){
return { return {
/** /**
* @ngdoc method * @ngdoc method
* @name angular.module.ng.$log#log * @name ng.$log#log
* @methodOf angular.module.ng.$log * @methodOf ng.$log
* *
* @description * @description
* Write a log message * Write a log message
@ -50,8 +50,8 @@ function $LogProvider(){
/** /**
* @ngdoc method * @ngdoc method
* @name angular.module.ng.$log#warn * @name ng.$log#warn
* @methodOf angular.module.ng.$log * @methodOf ng.$log
* *
* @description * @description
* Write a warning message * Write a warning message
@ -60,8 +60,8 @@ function $LogProvider(){
/** /**
* @ngdoc method * @ngdoc method
* @name angular.module.ng.$log#info * @name ng.$log#info
* @methodOf angular.module.ng.$log * @methodOf ng.$log
* *
* @description * @description
* Write an information message * Write an information message
@ -70,8 +70,8 @@ function $LogProvider(){
/** /**
* @ngdoc method * @ngdoc method
* @name angular.module.ng.$log#error * @name ng.$log#error
* @methodOf angular.module.ng.$log * @methodOf ng.$log
* *
* @description * @description
* Write an error message * Write an error message

View file

@ -809,7 +809,7 @@ function getterFn(path, csp) {
/** /**
* @ngdoc function * @ngdoc function
* @name angular.module.ng.$parse * @name ng.$parse
* @function * @function
* *
* @description * @description

View file

@ -2,7 +2,7 @@
/** /**
* @ngdoc service * @ngdoc service
* @name angular.module.ng.$q * @name ng.$q
* @requires $rootScope * @requires $rootScope
* *
* @description * @description
@ -116,7 +116,7 @@
* *
* There are three main differences: * There are three main differences:
* *
* - $q is integrated with the {@link angular.module.ng.$rootScope.Scope} Scope model observation * - $q is integrated with the {@link ng.$rootScope.Scope} Scope model observation
* mechanism in angular, which means faster propagation of resolution or rejection into your * mechanism in angular, which means faster propagation of resolution or rejection into your
* models and avoiding unnecessary browser repaints, which would result in flickering UI. * models and avoiding unnecessary browser repaints, which would result in flickering UI.
* - $q promises are recognized by the templating engine in angular, which means that in templates * - $q promises are recognized by the templating engine in angular, which means that in templates
@ -146,8 +146,8 @@ function qFactory(nextTick, exceptionHandler) {
/** /**
* @ngdoc * @ngdoc
* @name angular.module.ng.$q#defer * @name ng.$q#defer
* @methodOf angular.module.ng.$q * @methodOf ng.$q
* @description * @description
* Creates a `Deferred` object which represents a task which will finish in the future. * Creates a `Deferred` object which represents a task which will finish in the future.
* *
@ -236,8 +236,8 @@ function qFactory(nextTick, exceptionHandler) {
/** /**
* @ngdoc * @ngdoc
* @name angular.module.ng.$q#reject * @name ng.$q#reject
* @methodOf angular.module.ng.$q * @methodOf ng.$q
* @description * @description
* Creates a promise that is resolved as rejected with the specified `reason`. This api should be * Creates a promise that is resolved as rejected with the specified `reason`. This api should be
* used to forward rejection in a chain of promises. If you are dealing with the last promise in * used to forward rejection in a chain of promises. If you are dealing with the last promise in
@ -284,8 +284,8 @@ function qFactory(nextTick, exceptionHandler) {
/** /**
* @ngdoc * @ngdoc
* @name angular.module.ng.$q#when * @name ng.$q#when
* @methodOf angular.module.ng.$q * @methodOf ng.$q
* @description * @description
* Wraps an object that might be a value or a (3rd party) then-able promise into a $q promise. * Wraps an object that might be a value or a (3rd party) then-able promise into a $q promise.
* This is useful when you are dealing with on object that might or might not be a promise, or if * This is useful when you are dealing with on object that might or might not be a promise, or if
@ -347,8 +347,8 @@ function qFactory(nextTick, exceptionHandler) {
/** /**
* @ngdoc * @ngdoc
* @name angular.module.ng.$q#all * @name ng.$q#all
* @methodOf angular.module.ng.$q * @methodOf ng.$q
* @description * @description
* Combines multiple promises into a single promise that is resolved when all of the input * Combines multiple promises into a single promise that is resolved when all of the input
* promises are resolved. * promises are resolved.

View file

@ -2,13 +2,13 @@
/** /**
* @ngdoc overview * @ngdoc overview
* @name angular.module.ng.$rootElement * @name ng.$rootElement
* *
* @description * @description
* The root element of Angular application. This is either the element where {@link * The root element of Angular application. This is either the element where {@link
* angular.module.ng.$compileProvider.directive.ngApp ngApp} was declared or the element passed into * ng.directive:ngApp ngApp} was declared or the element passed into
* {@link angular.bootstrap}. The element represent the root element of application. It is also the * {@link angular.bootstrap}. The element represent the root element of application. It is also the
* location where the applications {@link angular.module.AUTO.$injector $injector} service gets * location where the applications {@link AUTO.$injector $injector} service gets
* published, it can be retrieved using `$rootElement.injector()`. * published, it can be retrieved using `$rootElement.injector()`.
*/ */

View file

@ -28,7 +28,7 @@
/** /**
* @ngdoc object * @ngdoc object
* @name angular.module.ng.$rootScopeProvider * @name ng.$rootScopeProvider
* @description * @description
* *
* Provider for the $rootScope service. * Provider for the $rootScope service.
@ -36,8 +36,8 @@
/** /**
* @ngdoc function * @ngdoc function
* @name angular.module.ng.$rootScopeProvider#digestTtl * @name ng.$rootScopeProvider#digestTtl
* @methodOf angular.module.ng.$rootScopeProvider * @methodOf ng.$rootScopeProvider
* @description * @description
* *
* Sets the number of digest iteration the scope should attempt to execute before giving up and * Sets the number of digest iteration the scope should attempt to execute before giving up and
@ -51,10 +51,10 @@
/** /**
* @ngdoc object * @ngdoc object
* @name angular.module.ng.$rootScope * @name ng.$rootScope
* @description * @description
* *
* Every application has a single root {@link angular.module.ng.$rootScope.Scope scope}. * Every application has a single root {@link ng.$rootScope.Scope scope}.
* All other scopes are child scopes of the root scope. Scopes provide mechanism for watching the model and provide * All other scopes are child scopes of the root scope. Scopes provide mechanism for watching the model and provide
* event processing life-cycle. See {@link guide/scope developer guide on scopes}. * event processing life-cycle. See {@link guide/scope developer guide on scopes}.
*/ */
@ -73,12 +73,12 @@ function $RootScopeProvider(){
/** /**
* @ngdoc function * @ngdoc function
* @name angular.module.ng.$rootScope.Scope * @name ng.$rootScope.Scope
* *
* @description * @description
* A root scope can be retrieved using the {@link angular.module.ng.$rootScope $rootScope} key from the * A root scope can be retrieved using the {@link ng.$rootScope $rootScope} key from the
* {@link angular.module.AUTO.$injector $injector}. Child scopes are created using the * {@link AUTO.$injector $injector}. Child scopes are created using the
* {@link angular.module.ng.$rootScope.Scope#$new $new()} method. (Most scopes are created automatically when * {@link ng.$rootScope.Scope#$new $new()} method. (Most scopes are created automatically when
* compiled HTML template is executed.) * compiled HTML template is executed.)
* *
* Here is a simple scope snippet to show how you can interact with the scope. * Here is a simple scope snippet to show how you can interact with the scope.
@ -121,7 +121,7 @@ function $RootScopeProvider(){
* *
* *
* @param {Object.<string, function()>=} providers Map of service factory which need to be provided * @param {Object.<string, function()>=} providers Map of service factory which need to be provided
* for the current scope. Defaults to {@link angular.module.ng}. * for the current scope. Defaults to {@link ng}.
* @param {Object.<string, *>=} instanceCache Provides pre-instantiated services which should * @param {Object.<string, *>=} instanceCache Provides pre-instantiated services which should
* append/override services provided by `providers`. This is handy when unit-testing and having * append/override services provided by `providers`. This is handy when unit-testing and having
* the need to override a default service. * the need to override a default service.
@ -140,8 +140,8 @@ function $RootScopeProvider(){
/** /**
* @ngdoc property * @ngdoc property
* @name angular.module.ng.$rootScope.Scope#$id * @name ng.$rootScope.Scope#$id
* @propertyOf angular.module.ng.$rootScope.Scope * @propertyOf ng.$rootScope.Scope
* @returns {number} Unique scope ID (monotonically increasing alphanumeric sequence) useful for * @returns {number} Unique scope ID (monotonically increasing alphanumeric sequence) useful for
* debugging. * debugging.
*/ */
@ -150,18 +150,18 @@ function $RootScopeProvider(){
Scope.prototype = { Scope.prototype = {
/** /**
* @ngdoc function * @ngdoc function
* @name angular.module.ng.$rootScope.Scope#$new * @name ng.$rootScope.Scope#$new
* @methodOf angular.module.ng.$rootScope.Scope * @methodOf ng.$rootScope.Scope
* @function * @function
* *
* @description * @description
* Creates a new child {@link angular.module.ng.$rootScope.Scope scope}. * Creates a new child {@link ng.$rootScope.Scope scope}.
* *
* The parent scope will propagate the {@link angular.module.ng.$rootScope.Scope#$digest $digest()} and * The parent scope will propagate the {@link ng.$rootScope.Scope#$digest $digest()} and
* {@link angular.module.ng.$rootScope.Scope#$digest $digest()} events. The scope can be removed from the scope * {@link ng.$rootScope.Scope#$digest $digest()} events. The scope can be removed from the scope
* hierarchy using {@link angular.module.ng.$rootScope.Scope#$destroy $destroy()}. * hierarchy using {@link ng.$rootScope.Scope#$destroy $destroy()}.
* *
* {@link angular.module.ng.$rootScope.Scope#$destroy $destroy()} must be called on a scope when it is desired for * {@link ng.$rootScope.Scope#$destroy $destroy()} must be called on a scope when it is desired for
* the scope and its child scopes to be permanently detached from the parent and thus stop * the scope and its child scopes to be permanently detached from the parent and thus stop
* participating in model change detection and listener notification by invoking. * participating in model change detection and listener notification by invoking.
* *
@ -209,17 +209,17 @@ function $RootScopeProvider(){
/** /**
* @ngdoc function * @ngdoc function
* @name angular.module.ng.$rootScope.Scope#$watch * @name ng.$rootScope.Scope#$watch
* @methodOf angular.module.ng.$rootScope.Scope * @methodOf ng.$rootScope.Scope
* @function * @function
* *
* @description * @description
* Registers a `listener` callback to be executed whenever the `watchExpression` changes. * Registers a `listener` callback to be executed whenever the `watchExpression` changes.
* *
* - The `watchExpression` is called on every call to {@link angular.module.ng.$rootScope.Scope#$digest $digest()} and * - The `watchExpression` is called on every call to {@link ng.$rootScope.Scope#$digest $digest()} and
* should return the value which will be watched. (Since {@link angular.module.ng.$rootScope.Scope#$digest $digest()} * should return the value which will be watched. (Since {@link ng.$rootScope.Scope#$digest $digest()}
* reruns when it detects changes the `watchExpression` can execute multiple times per * reruns when it detects changes the `watchExpression` can execute multiple times per
* {@link angular.module.ng.$rootScope.Scope#$digest $digest()} and should be idempotent.) * {@link ng.$rootScope.Scope#$digest $digest()} and should be idempotent.)
* - The `listener` is called only when the value from the current `watchExpression` and the * - The `listener` is called only when the value from the current `watchExpression` and the
* previous call to `watchExpression' are not equal (with the exception of the initial run * previous call to `watchExpression' are not equal (with the exception of the initial run
* see below). The inequality is determined according to * see below). The inequality is determined according to
@ -231,13 +231,13 @@ function $RootScopeProvider(){
* limit is 100 to prevent infinity loop deadlock. * limit is 100 to prevent infinity loop deadlock.
* *
* *
* If you want to be notified whenever {@link angular.module.ng.$rootScope.Scope#$digest $digest} is called, * If you want to be notified whenever {@link ng.$rootScope.Scope#$digest $digest} is called,
* you can register an `watchExpression` function with no `listener`. (Since `watchExpression`, * you can register an `watchExpression` function with no `listener`. (Since `watchExpression`,
* can execute multiple times per {@link angular.module.ng.$rootScope.Scope#$digest $digest} cycle when a change is * can execute multiple times per {@link ng.$rootScope.Scope#$digest $digest} cycle when a change is
* detected, be prepared for multiple calls to your listener.) * detected, be prepared for multiple calls to your listener.)
* *
* After a watcher is registered with the scope, the `listener` fn is called asynchronously * After a watcher is registered with the scope, the `listener` fn is called asynchronously
* (via {@link angular.module.ng.$rootScope.Scope#$evalAsync $evalAsync}) to initialize the * (via {@link ng.$rootScope.Scope#$evalAsync $evalAsync}) to initialize the
* watcher. In rare cases, this is undesirable because the listener is called when the result * watcher. In rare cases, this is undesirable because the listener is called when the result
* of `watchExpression` didn't change. To detect this scenario within the `listener` fn, you * of `watchExpression` didn't change. To detect this scenario within the `listener` fn, you
* can compare the `newVal` and `oldVal`. If these two values are identical (`===`) then the * can compare the `newVal` and `oldVal`. If these two values are identical (`===`) then the
@ -245,7 +245,7 @@ function $RootScopeProvider(){
* *
* *
* # Example * # Example
<pre> * <pre>
// let's assume that scope was dependency injected as the $rootScope // let's assume that scope was dependency injected as the $rootScope
var scope = $rootScope; var scope = $rootScope;
scope.name = 'misko'; scope.name = 'misko';
@ -262,12 +262,12 @@ function $RootScopeProvider(){
scope.name = 'adam'; scope.name = 'adam';
scope.$digest(); scope.$digest();
expect(scope.counter).toEqual(1); expect(scope.counter).toEqual(1);
</pre> * </pre>
* *
* *
* *
* @param {(function()|string)} watchExpression Expression that is evaluated on each * @param {(function()|string)} watchExpression Expression that is evaluated on each
* {@link angular.module.ng.$rootScope.Scope#$digest $digest} cycle. A change in the return value triggers a * {@link ng.$rootScope.Scope#$digest $digest} cycle. A change in the return value triggers a
* call to the `listener`. * call to the `listener`.
* *
* - `string`: Evaluated as {@link guide/expression expression} * - `string`: Evaluated as {@link guide/expression expression}
@ -313,32 +313,32 @@ function $RootScopeProvider(){
/** /**
* @ngdoc function * @ngdoc function
* @name angular.module.ng.$rootScope.Scope#$digest * @name ng.$rootScope.Scope#$digest
* @methodOf angular.module.ng.$rootScope.Scope * @methodOf ng.$rootScope.Scope
* @function * @function
* *
* @description * @description
* Process all of the {@link angular.module.ng.$rootScope.Scope#$watch watchers} of the current scope and its children. * Process all of the {@link ng.$rootScope.Scope#$watch watchers} of the current scope and its children.
* Because a {@link angular.module.ng.$rootScope.Scope#$watch watcher}'s listener can change the model, the * Because a {@link ng.$rootScope.Scope#$watch watcher}'s listener can change the model, the
* `$digest()` keeps calling the {@link angular.module.ng.$rootScope.Scope#$watch watchers} until no more listeners are * `$digest()` keeps calling the {@link ng.$rootScope.Scope#$watch watchers} until no more listeners are
* firing. This means that it is possible to get into an infinite loop. This function will throw * firing. This means that it is possible to get into an infinite loop. This function will throw
* `'Maximum iteration limit exceeded.'` if the number of iterations exceeds 10. * `'Maximum iteration limit exceeded.'` if the number of iterations exceeds 10.
* *
* Usually you don't call `$digest()` directly in * Usually you don't call `$digest()` directly in
* {@link angular.module.ng.$compileProvider.directive.ngController controllers} or in * {@link ng.directive:ngController controllers} or in
* {@link angular.module.ng.$compileProvider.directive directives}. * {@link ng.$compileProvider.directive directives}.
* Instead a call to {@link angular.module.ng.$rootScope.Scope#$apply $apply()} (typically from within a * Instead a call to {@link ng.$rootScope.Scope#$apply $apply()} (typically from within a
* {@link angular.module.ng.$compileProvider.directive directives}) will force a `$digest()`. * {@link ng.$compileProvider.directive directives}) will force a `$digest()`.
* *
* If you want to be notified whenever `$digest()` is called, * If you want to be notified whenever `$digest()` is called,
* you can register a `watchExpression` function with {@link angular.module.ng.$rootScope.Scope#$watch $watch()} * you can register a `watchExpression` function with {@link ng.$rootScope.Scope#$watch $watch()}
* with no `listener`. * with no `listener`.
* *
* You may have a need to call `$digest()` from within unit-tests, to simulate the scope * You may have a need to call `$digest()` from within unit-tests, to simulate the scope
* life-cycle. * life-cycle.
* *
* # Example * # Example
<pre> * <pre>
var scope = ...; var scope = ...;
scope.name = 'misko'; scope.name = 'misko';
scope.counter = 0; scope.counter = 0;
@ -356,7 +356,7 @@ function $RootScopeProvider(){
scope.name = 'adam'; scope.name = 'adam';
scope.$digest(); scope.$digest();
expect(scope.counter).toEqual(1); expect(scope.counter).toEqual(1);
</pre> * </pre>
* *
*/ */
$digest: function() { $digest: function() {
@ -438,8 +438,8 @@ function $RootScopeProvider(){
/** /**
* @ngdoc event * @ngdoc event
* @name angular.module.$rootScope.Scope#$destroy * @name ng.$rootScope.Scope#$destroy
* @eventOf angular.module.ng.$rootScope.Scope * @eventOf ng.$rootScope.Scope
* @eventType broadcast on scope being destroyed * @eventType broadcast on scope being destroyed
* *
* @description * @description
@ -448,18 +448,18 @@ function $RootScopeProvider(){
/** /**
* @ngdoc function * @ngdoc function
* @name angular.module.ng.$rootScope.Scope#$destroy * @name ng.$rootScope.Scope#$destroy
* @methodOf angular.module.ng.$rootScope.Scope * @methodOf ng.$rootScope.Scope
* @function * @function
* *
* @description * @description
* Remove the current scope (and all of its children) from the parent scope. Removal implies * Remove the current scope (and all of its children) from the parent scope. Removal implies
* that calls to {@link angular.module.ng.$rootScope.Scope#$digest $digest()} will no longer * that calls to {@link ng.$rootScope.Scope#$digest $digest()} will no longer
* propagate to the current scope and its children. Removal also implies that the current * propagate to the current scope and its children. Removal also implies that the current
* scope is eligible for garbage collection. * scope is eligible for garbage collection.
* *
* The `$destroy()` is usually used by directives such as * The `$destroy()` is usually used by directives such as
* {@link angular.module.ng.$compileProvider.directive.ngRepeat ngRepeat} for managing the * {@link ng.directive:ngRepeat ngRepeat} for managing the
* unrolling of the loop. * unrolling of the loop.
* *
* Just before a scope is destroyed a `$destroy` event is broadcasted on this scope. * Just before a scope is destroyed a `$destroy` event is broadcasted on this scope.
@ -480,8 +480,8 @@ function $RootScopeProvider(){
/** /**
* @ngdoc function * @ngdoc function
* @name angular.module.ng.$rootScope.Scope#$eval * @name ng.$rootScope.Scope#$eval
* @methodOf angular.module.ng.$rootScope.Scope * @methodOf ng.$rootScope.Scope
* @function * @function
* *
* @description * @description
@ -489,14 +489,14 @@ function $RootScopeProvider(){
* expression are propagated (uncaught). This is useful when evaluating engular expressions. * expression are propagated (uncaught). This is useful when evaluating engular expressions.
* *
* # Example * # Example
<pre> * <pre>
var scope = angular.module.ng.$rootScope.Scope(); var scope = ng.$rootScope.Scope();
scope.a = 1; scope.a = 1;
scope.b = 2; scope.b = 2;
expect(scope.$eval('a+b')).toEqual(3); expect(scope.$eval('a+b')).toEqual(3);
expect(scope.$eval(function(scope){ return scope.a + scope.b; })).toEqual(3); expect(scope.$eval(function(scope){ return scope.a + scope.b; })).toEqual(3);
</pre> * </pre>
* *
* @param {(string|function())=} expression An angular expression to be executed. * @param {(string|function())=} expression An angular expression to be executed.
* *
@ -511,8 +511,8 @@ function $RootScopeProvider(){
/** /**
* @ngdoc function * @ngdoc function
* @name angular.module.ng.$rootScope.Scope#$evalAsync * @name ng.$rootScope.Scope#$evalAsync
* @methodOf angular.module.ng.$rootScope.Scope * @methodOf ng.$rootScope.Scope
* @function * @function
* *
* @description * @description
@ -521,11 +521,11 @@ function $RootScopeProvider(){
* The `$evalAsync` makes no guarantees as to when the `expression` will be executed, only that: * The `$evalAsync` makes no guarantees as to when the `expression` will be executed, only that:
* *
* - it will execute in the current script execution context (before any DOM rendering). * - it will execute in the current script execution context (before any DOM rendering).
* - at least one {@link angular.module.ng.$rootScope.Scope#$digest $digest cycle} will be performed after * - at least one {@link ng.$rootScope.Scope#$digest $digest cycle} will be performed after
* `expression` execution. * `expression` execution.
* *
* Any exceptions from the execution of the expression are forwarded to the * Any exceptions from the execution of the expression are forwarded to the
* {@link angular.module.ng.$exceptionHandler $exceptionHandler} service. * {@link ng.$exceptionHandler $exceptionHandler} service.
* *
* @param {(string|function())=} expression An angular expression to be executed. * @param {(string|function())=} expression An angular expression to be executed.
* *
@ -539,39 +539,41 @@ function $RootScopeProvider(){
/** /**
* @ngdoc function * @ngdoc function
* @name angular.module.ng.$rootScope.Scope#$apply * @name ng.$rootScope.Scope#$apply
* @methodOf angular.module.ng.$rootScope.Scope * @methodOf ng.$rootScope.Scope
* @function * @function
* *
* @description * @description
* `$apply()` is used to execute an expression in angular from outside of the angular framework. * `$apply()` is used to execute an expression in angular from outside of the angular framework.
* (For example from browser DOM events, setTimeout, XHR or third party libraries). * (For example from browser DOM events, setTimeout, XHR or third party libraries).
* Because we are calling into the angular framework we need to perform proper scope life-cycle * Because we are calling into the angular framework we need to perform proper scope life-cycle
* of {@link angular.module.ng.$exceptionHandler exception handling}, * of {@link ng.$exceptionHandler exception handling},
* {@link angular.module.ng.$rootScope.Scope#$digest executing watches}. * {@link ng.$rootScope.Scope#$digest executing watches}.
* *
* ## Life cycle * ## Life cycle
* *
* # Pseudo-Code of `$apply()` * # Pseudo-Code of `$apply()`
function $apply(expr) { * <pre>
try { function $apply(expr) {
return $eval(expr); try {
} catch (e) { return $eval(expr);
$exceptionHandler(e); } catch (e) {
} finally { $exceptionHandler(e);
$root.$digest(); } finally {
} $root.$digest();
} }
}
* </pre>
* *
* *
* Scope's `$apply()` method transitions through the following stages: * Scope's `$apply()` method transitions through the following stages:
* *
* 1. The {@link guide/expression expression} is executed using the * 1. The {@link guide/expression expression} is executed using the
* {@link angular.module.ng.$rootScope.Scope#$eval $eval()} method. * {@link ng.$rootScope.Scope#$eval $eval()} method.
* 2. Any exceptions from the execution of the expression are forwarded to the * 2. Any exceptions from the execution of the expression are forwarded to the
* {@link angular.module.ng.$exceptionHandler $exceptionHandler} service. * {@link ng.$exceptionHandler $exceptionHandler} service.
* 3. The {@link angular.module.ng.$rootScope.Scope#$watch watch} listeners are fired immediately after the expression * 3. The {@link ng.$rootScope.Scope#$watch watch} listeners are fired immediately after the expression
* was executed using the {@link angular.module.ng.$rootScope.Scope#$digest $digest()} method. * was executed using the {@link ng.$rootScope.Scope#$digest $digest()} method.
* *
* *
* @param {(string|function())=} exp An angular expression to be executed. * @param {(string|function())=} exp An angular expression to be executed.
@ -600,12 +602,12 @@ function $RootScopeProvider(){
/** /**
* @ngdoc function * @ngdoc function
* @name angular.module.ng.$rootScope.Scope#$on * @name ng.$rootScope.Scope#$on
* @methodOf angular.module.ng.$rootScope.Scope * @methodOf ng.$rootScope.Scope
* @function * @function
* *
* @description * @description
* Listen on events of a given type. See {@link angular.module.ng.$rootScope.Scope#$emit $emit} for discussion of * Listen on events of a given type. See {@link ng.$rootScope.Scope#$emit $emit} for discussion of
* event life cycle. * event life cycle.
* *
* @param {string} name Event name to listen on. * @param {string} name Event name to listen on.
@ -638,25 +640,25 @@ function $RootScopeProvider(){
/** /**
* @ngdoc function * @ngdoc function
* @name angular.module.ng.$rootScope.Scope#$emit * @name ng.$rootScope.Scope#$emit
* @methodOf angular.module.ng.$rootScope.Scope * @methodOf ng.$rootScope.Scope
* @function * @function
* *
* @description * @description
* Dispatches an event `name` upwards through the scope hierarchy notifying the * Dispatches an event `name` upwards through the scope hierarchy notifying the
* registered {@link angular.module.ng.$rootScope.Scope#$on} listeners. * registered {@link ng.$rootScope.Scope#$on} listeners.
* *
* The event life cycle starts at the scope on which `$emit` was called. All * The event life cycle starts at the scope on which `$emit` was called. All
* {@link angular.module.ng.$rootScope.Scope#$on listeners} listening for `name` event on this scope get notified. * {@link ng.$rootScope.Scope#$on listeners} listening for `name` event on this scope get notified.
* Afterwards, the event traverses upwards toward the root scope and calls all registered * Afterwards, the event traverses upwards toward the root scope and calls all registered
* listeners along the way. The event will stop propagating if one of the listeners cancels it. * listeners along the way. The event will stop propagating if one of the listeners cancels it.
* *
* Any exception emmited from the {@link angular.module.ng.$rootScope.Scope#$on listeners} will be passed * Any exception emmited from the {@link ng.$rootScope.Scope#$on listeners} will be passed
* onto the {@link angular.module.ng.$exceptionHandler $exceptionHandler} service. * onto the {@link ng.$exceptionHandler $exceptionHandler} service.
* *
* @param {string} name Event name to emit. * @param {string} name Event name to emit.
* @param {...*} args Optional set of arguments which will be passed onto the event listeners. * @param {...*} args Optional set of arguments which will be passed onto the event listeners.
* @return {Object} Event object, see {@link angular.module.ng.$rootScope.Scope#$on} * @return {Object} Event object, see {@link ng.$rootScope.Scope#$on}
*/ */
$emit: function(name, args) { $emit: function(name, args) {
var empty = [], var empty = [],
@ -696,25 +698,25 @@ function $RootScopeProvider(){
/** /**
* @ngdoc function * @ngdoc function
* @name angular.module.ng.$rootScope.Scope#$broadcast * @name ng.$rootScope.Scope#$broadcast
* @methodOf angular.module.ng.$rootScope.Scope * @methodOf ng.$rootScope.Scope
* @function * @function
* *
* @description * @description
* Dispatches an event `name` downwards to all child scopes (and their children) notifying the * Dispatches an event `name` downwards to all child scopes (and their children) notifying the
* registered {@link angular.module.ng.$rootScope.Scope#$on} listeners. * registered {@link ng.$rootScope.Scope#$on} listeners.
* *
* The event life cycle starts at the scope on which `$broadcast` was called. All * The event life cycle starts at the scope on which `$broadcast` was called. All
* {@link angular.module.ng.$rootScope.Scope#$on listeners} listening for `name` event on this scope get notified. * {@link ng.$rootScope.Scope#$on listeners} listening for `name` event on this scope get notified.
* Afterwards, the event propagates to all direct and indirect scopes of the current scope and * Afterwards, the event propagates to all direct and indirect scopes of the current scope and
* calls all registered listeners along the way. The event cannot be canceled. * calls all registered listeners along the way. The event cannot be canceled.
* *
* Any exception emmited from the {@link angular.module.ng.$rootScope.Scope#$on listeners} will be passed * Any exception emmited from the {@link ng.$rootScope.Scope#$on listeners} will be passed
* onto the {@link angular.module.ng.$exceptionHandler $exceptionHandler} service. * onto the {@link ng.$exceptionHandler $exceptionHandler} service.
* *
* @param {string} name Event name to emit. * @param {string} name Event name to emit.
* @param {...*} args Optional set of arguments which will be passed onto the event listeners. * @param {...*} args Optional set of arguments which will be passed onto the event listeners.
* @return {Object} Event object, see {@link angular.module.ng.$rootScope.Scope#$on} * @return {Object} Event object, see {@link ng.$rootScope.Scope#$on}
*/ */
$broadcast: function(name, args) { $broadcast: function(name, args) {
var target = this, var target = this,

View file

@ -3,20 +3,20 @@
/** /**
* @ngdoc object * @ngdoc object
* @name angular.module.ng.$routeProvider * @name ng.$routeProvider
* @function * @function
* *
* @description * @description
* *
* Used for configuring routes. See {@link angular.module.ng.$route $route} for an example. * Used for configuring routes. See {@link ng.$route $route} for an example.
*/ */
function $RouteProvider(){ function $RouteProvider(){
var routes = {}; var routes = {};
/** /**
* @ngdoc method * @ngdoc method
* @name angular.module.ng.$routeProvider#when * @name ng.$routeProvider#when
* @methodOf angular.module.ng.$routeProvider * @methodOf ng.$routeProvider
* *
* @param {string} path Route path (matched against `$location.path`). If `$location.path` * @param {string} path Route path (matched against `$location.path`). If `$location.path`
* contains redundant trailing slash or is missing one, the route will still match and the * contains redundant trailing slash or is missing one, the route will still match and the
@ -30,11 +30,11 @@ function $RouteProvider(){
* - `controller` `{function()=}` Controller fn that should be associated with newly * - `controller` `{function()=}` Controller fn that should be associated with newly
* created scope. * created scope.
* - `template` `{string=}` html template as a string that should be used by * - `template` `{string=}` html template as a string that should be used by
* {@link angular.module.ng.$compileProvider.directive.ngView ngView} or * {@link ng.directive:ngView ngView} or
* {@link angular.module.ng.$compileProvider.directive.ngInclude ngInclude} directives. * {@link ng.directive:ngInclude ngInclude} directives.
* this property takes precedence over `templateUrl`. * this property takes precedence over `templateUrl`.
* - `templateUrl` `{string=}` path to an html template that should be used by * - `templateUrl` `{string=}` path to an html template that should be used by
* {@link angular.module.ng.$compileProvider.directive.ngView ngView}. * {@link ng.directive:ngView ngView}.
* - `resolve` - `{Object.<string, function>=}` - An optional map of dependencies which should * - `resolve` - `{Object.<string, function>=}` - An optional map of dependencies which should
* be injected into the controller. If any of these dependencies are promises, they will be * be injected into the controller. If any of these dependencies are promises, they will be
* resolved and converted to a value before the controller is instantiated and the * resolved and converted to a value before the controller is instantiated and the
@ -42,12 +42,12 @@ function $RouteProvider(){
* *
* - `key` `{string}`: a name of a dependency to be injected into the controller. * - `key` `{string}`: a name of a dependency to be injected into the controller.
* - `factory` - `{string|function}`: If `string` then it is an alias for a service. * - `factory` - `{string|function}`: If `string` then it is an alias for a service.
* Otherwise if function, then it is {@link api/angular.module.AUTO.$injector#invoke injected} * Otherwise if function, then it is {@link api/AUTO.$injector#invoke injected}
* and the return value is treated as the dependency. If the result is a promise, it is resolved * and the return value is treated as the dependency. If the result is a promise, it is resolved
* before its value is injected into the controller. * before its value is injected into the controller.
* *
* - `redirectTo` {(string|function())=} value to update * - `redirectTo` {(string|function())=} value to update
* {@link angular.module.ng.$location $location} path with and trigger route redirection. * {@link ng.$location $location} path with and trigger route redirection.
* *
* If `redirectTo` is a function, it will be called with the following parameters: * If `redirectTo` is a function, it will be called with the following parameters:
* *
@ -87,8 +87,8 @@ function $RouteProvider(){
/** /**
* @ngdoc method * @ngdoc method
* @name angular.module.ng.$routeProvider#otherwise * @name ng.$routeProvider#otherwise
* @methodOf angular.module.ng.$routeProvider * @methodOf ng.$routeProvider
* *
* @description * @description
* Sets route definition that will be used on route change when no other route definition * Sets route definition that will be used on route change when no other route definition
@ -108,7 +108,7 @@ function $RouteProvider(){
/** /**
* @ngdoc object * @ngdoc object
* @name angular.module.ng.$route * @name ng.$route
* @requires $location * @requires $location
* @requires $routeParams * @requires $routeParams
* *
@ -116,7 +116,7 @@ function $RouteProvider(){
* The route definition contains: * The route definition contains:
* *
* - `controller`: The controller constructor as define in route definition. * - `controller`: The controller constructor as define in route definition.
* - `locals`: A map of locals which is used by {@link angular.module.ng.$controller $controller} service for * - `locals`: A map of locals which is used by {@link ng.$controller $controller} service for
* controller instantiation. The `locals` contain * controller instantiation. The `locals` contain
* the resolved values of the `resolve` map. Additionally the `locals` also contain: * the resolved values of the `resolve` map. Additionally the `locals` also contain:
* *
@ -129,16 +129,16 @@ function $RouteProvider(){
* Is used for deep-linking URLs to controllers and views (HTML partials). * Is used for deep-linking URLs to controllers and views (HTML partials).
* It watches `$location.url()` and tries to map the path to an existing route definition. * It watches `$location.url()` and tries to map the path to an existing route definition.
* *
* You can define routes through {@link angular.module.ng.$routeProvider $routeProvider}'s API. * You can define routes through {@link ng.$routeProvider $routeProvider}'s API.
* *
* The `$route` service is typically used in conjunction with {@link angular.module.ng.$compileProvider.directive.ngView ngView} * The `$route` service is typically used in conjunction with {@link ng.directive:ngView ngView}
* directive and the {@link angular.module.ng.$routeParams $routeParams} service. * directive and the {@link ng.$routeParams $routeParams} service.
* *
* @example * @example
This example shows how changing the URL hash causes the `$route` to match a route against the This example shows how changing the URL hash causes the `$route` to match a route against the
URL, and the `ngView` pulls in the partial. URL, and the `ngView` pulls in the partial.
Note that this example is using {@link angular.module.ng.$compileProvider.directive.script inlined templates} Note that this example is using {@link ng.directive:script inlined templates}
to get it working on jsfiddle as well. to get it working on jsfiddle as well.
<example module="ngView"> <example module="ngView">
@ -233,8 +233,8 @@ function $RouteProvider(){
/** /**
* @ngdoc event * @ngdoc event
* @name angular.module.ng.$route#$routeChangeStart * @name ng.$route#$routeChangeStart
* @eventOf angular.module.ng.$route * @eventOf ng.$route
* @eventType broadcast on root scope * @eventType broadcast on root scope
* @description * @description
* Broadcasted before a route change. At this point the route services starts * Broadcasted before a route change. At this point the route services starts
@ -249,12 +249,12 @@ function $RouteProvider(){
/** /**
* @ngdoc event * @ngdoc event
* @name angular.module.ng.$route#$routeChangeSuccess * @name ng.$route#$routeChangeSuccess
* @eventOf angular.module.ng.$route * @eventOf ng.$route
* @eventType broadcast on root scope * @eventType broadcast on root scope
* @description * @description
* Broadcasted after a route dependencies are resolved. * Broadcasted after a route dependencies are resolved.
* {@link angular.module.ng.$compileProvider.directive.ngView ngView} listens for the directive * {@link ng.directive:ngView ngView} listens for the directive
* to instantiate the controller and render the view. * to instantiate the controller and render the view.
* *
* @param {Route} current Current route information. * @param {Route} current Current route information.
@ -263,8 +263,8 @@ function $RouteProvider(){
/** /**
* @ngdoc event * @ngdoc event
* @name angular.module.ng.$route#$routeChangeError * @name ng.$route#$routeChangeError
* @eventOf angular.module.ng.$route * @eventOf ng.$route
* @eventType broadcast on root scope * @eventType broadcast on root scope
* @description * @description
* Broadcasted if any of the resolve promises are rejected. * Broadcasted if any of the resolve promises are rejected.
@ -276,8 +276,8 @@ function $RouteProvider(){
/** /**
* @ngdoc event * @ngdoc event
* @name angular.module.ng.$route#$routeUpdate * @name ng.$route#$routeUpdate
* @eventOf angular.module.ng.$route * @eventOf ng.$route
* @eventType broadcast on root scope * @eventType broadcast on root scope
* @description * @description
* *
@ -292,14 +292,14 @@ function $RouteProvider(){
/** /**
* @ngdoc method * @ngdoc method
* @name angular.module.ng.$route#reload * @name ng.$route#reload
* @methodOf angular.module.ng.$route * @methodOf ng.$route
* *
* @description * @description
* Causes `$route` service to reload the current route even if * Causes `$route` service to reload the current route even if
* {@link angular.module.ng.$location $location} hasn't changed. * {@link ng.$location $location} hasn't changed.
* *
* As a result of that, {@link angular.module.ng.$compileProvider.directive.ngView ngView} * As a result of that, {@link ng.directive:ngView ngView}
* creates new scope, reinstantiates the controller. * creates new scope, reinstantiates the controller.
*/ */
reload: function() { reload: function() {

View file

@ -2,13 +2,13 @@
/** /**
* @ngdoc object * @ngdoc object
* @name angular.module.ng.$routeParams * @name ng.$routeParams
* @requires $route * @requires $route
* *
* @description * @description
* Current set of route parameters. The route parameters are a combination of the * Current set of route parameters. The route parameters are a combination of the
* {@link angular.module.ng.$location $location} `search()`, and `path()`. The `path` parameters * {@link ng.$location $location} `search()`, and `path()`. The `path` parameters
* are extracted when the {@link angular.module.ng.$route $route} path is matched. * are extracted when the {@link ng.$route $route} path is matched.
* *
* In case of parameter name collision, `path` params take precedence over `search` params. * In case of parameter name collision, `path` params take precedence over `search` params.
* *

View file

@ -3,7 +3,7 @@
/** /**
* !!! This is an undocumented "private" service !!! * !!! This is an undocumented "private" service !!!
* *
* @name angular.module.ng.$sniffer * @name ng.$sniffer
* @requires $window * @requires $window
* *
* @property {boolean} history Does the browser support html5 history api ? * @property {boolean} history Does the browser support html5 history api ?

View file

@ -9,26 +9,26 @@ function $TimeoutProvider() {
/** /**
* @ngdoc function * @ngdoc function
* @name angular.module.ng.$timeout * @name ng.$timeout
* @requires $browser * @requires $browser
* *
* @description * @description
* Angular's wrapper for `window.setTimeout`. The `fn` function is wrapped into a try/catch * Angular's wrapper for `window.setTimeout`. The `fn` function is wrapped into a try/catch
* block and delegates any exceptions to * block and delegates any exceptions to
* {@link angular.module.ng.$exceptionHandler $exceptionHandler} service. * {@link ng.$exceptionHandler $exceptionHandler} service.
* *
* The return value of registering a timeout function is a promise which will be resolved when * The return value of registering a timeout function is a promise which will be resolved when
* the timeout is reached and the timeout function is executed. * the timeout is reached and the timeout function is executed.
* *
* To cancel a the timeout request, call `$timeout.cancel(promise)`. * To cancel a the timeout request, call `$timeout.cancel(promise)`.
* *
* In tests you can use {@link angular.module.ngMock.$timeout `$timeout.flush()`} to * In tests you can use {@link ngMock.$timeout `$timeout.flush()`} to
* synchronously flush the queue of deferred functions. * synchronously flush the queue of deferred functions.
* *
* @param {function()} fn A function, who's execution should be delayed. * @param {function()} fn A function, who's execution should be delayed.
* @param {number=} [delay=0] Delay in milliseconds. * @param {number=} [delay=0] Delay in milliseconds.
* @param {boolean=} [invokeApply=true] If set to false skips model dirty checking, otherwise * @param {boolean=} [invokeApply=true] If set to false skips model dirty checking, otherwise
* will invoke `fn` within the {@link angular.module.ng.$rootScope.Scope#$apply $apply} block. * will invoke `fn` within the {@link ng.$rootScope.Scope#$apply $apply} block.
* @returns {*} Promise that will be resolved when the timeout is reached. The value this * @returns {*} Promise that will be resolved when the timeout is reached. The value this
* promise will be resolved with is the return value of the `fn` function. * promise will be resolved with is the return value of the `fn` function.
*/ */
@ -63,8 +63,8 @@ function $TimeoutProvider() {
/** /**
* @ngdoc function * @ngdoc function
* @name angular.module.ng.$timeout#cancel * @name ng.$timeout#cancel
* @methodOf angular.module.ng.$timeout * @methodOf ng.$timeout
* *
* @description * @description
* Cancels a task associated with the `promise`. As a result of this the promise will be * Cancels a task associated with the `promise`. As a result of this the promise will be

View file

@ -2,7 +2,7 @@
/** /**
* @ngdoc object * @ngdoc object
* @name angular.module.ng.$window * @name ng.$window
* *
* @description * @description
* A reference to the browser's `window` object. While `window` * A reference to the browser's `window` object. While `window`

View file

@ -2,14 +2,14 @@
/** /**
* @ngdoc overview * @ngdoc overview
* @name angular.module.ngCookies * @name ngCookies
*/ */
angular.module('ngCookies', ['ng']). angular.module('ngCookies', ['ng']).
/** /**
* @ngdoc object * @ngdoc object
* @name angular.module.ngCookies.$cookies * @name ngCookies.$cookies
* @requires $browser * @requires $browser
* *
* @description * @description
@ -103,7 +103,7 @@ angular.module('ngCookies', ['ng']).
/** /**
* @ngdoc object * @ngdoc object
* @name angular.module.ngCookies.$cookieStore * @name ngCookies.$cookieStore
* @requires $cookies * @requires $cookies
* *
* @description * @description
@ -117,8 +117,8 @@ angular.module('ngCookies', ['ng']).
return { return {
/** /**
* @ngdoc method * @ngdoc method
* @name angular.module.ngCookies.$cookieStore#get * @name ngCookies.$cookieStore#get
* @methodOf angular.module.ngCookies.$cookieStore * @methodOf ngCookies.$cookieStore
* *
* @description * @description
* Returns the value of given cookie key * Returns the value of given cookie key
@ -132,8 +132,8 @@ angular.module('ngCookies', ['ng']).
/** /**
* @ngdoc method * @ngdoc method
* @name angular.module.ngCookies.$cookieStore#put * @name ngCookies.$cookieStore#put
* @methodOf angular.module.ngCookies.$cookieStore * @methodOf ngCookies.$cookieStore
* *
* @description * @description
* Sets a value for given cookie key * Sets a value for given cookie key
@ -147,8 +147,8 @@ angular.module('ngCookies', ['ng']).
/** /**
* @ngdoc method * @ngdoc method
* @name angular.module.ngCookies.$cookieStore#remove * @name ngCookies.$cookieStore#remove
* @methodOf angular.module.ngCookies.$cookieStore * @methodOf ngCookies.$cookieStore
* *
* @description * @description
* Remove given cookie * Remove given cookie

Some files were not shown because too many files have changed in this diff Show more