diff options
| author | Igor Minar | 2012-06-11 23:49:24 -0700 | 
|---|---|---|
| committer | Igor Minar | 2012-06-12 00:10:18 -0700 | 
| commit | f16150d5f1b20b3d633b4402095ea89baa4be042 (patch) | |
| tree | 9d5c570348264884174ecca52b958da7a821fcf8 /docs | |
| parent | fc0b2b5715655a05cbb4c8e79969c95d7e7ce8b7 (diff) | |
| download | angular.js-f16150d5f1b20b3d633b4402095ea89baa4be042.tar.bz2 | |
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
Diffstat (limited to 'docs')
46 files changed, 238 insertions, 235 deletions
| diff --git a/docs/content/api/angular.module.ng.ngdoc b/docs/content/api/ng.ngdoc index 2ac39e56..95295e69 100644 --- a/docs/content/api/angular.module.ng.ngdoc +++ b/docs/content/api/ng.ngdoc @@ -1,5 +1,5 @@  @ngdoc overview -@name angular.module.ng +@name ng  @description  The `ng` is an angular module which contains all of the core angular services. diff --git a/docs/content/cookbook/deeplinking.ngdoc b/docs/content/cookbook/deeplinking.ngdoc index 1e9c0161..f5509621 100644 --- a/docs/content/cookbook/deeplinking.ngdoc +++ b/docs/content/cookbook/deeplinking.ngdoc @@ -141,11 +141,11 @@ In this example we have a simple app which consist of two screens:  # Things to notice  * 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. -* 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. -* 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.  * 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. diff --git a/docs/content/cookbook/form.ngdoc b/docs/content/cookbook/form.ngdoc index 829547f4..3b85b80b 100644 --- a/docs/content/cookbook/form.ngdoc +++ b/docs/content/cookbook/form.ngdoc @@ -102,11 +102,11 @@ allow a user to enter data.  # Things to notice -* The user data model is initialized {@link api/angular.module.ng.$compileProvider.directive.ngController controller} and is -  available in the {@link api/angular.module.ng.$rootScope.Scope scope} with the initial data. +* The user data model is initialized {@link api/ng.directive:ngController controller} and is +  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    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.  * 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. diff --git a/docs/content/cookbook/helloworld.ngdoc b/docs/content/cookbook/helloworld.ngdoc index 92c50cf2..786511e9 100644 --- a/docs/content/cookbook/helloworld.ngdoc +++ b/docs/content/cookbook/helloworld.ngdoc @@ -29,10 +29,10 @@  Take a look through the source and note:  * 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.  * 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 concept of {@link guide/dev_guide.templates.databinding data binding}, which reflects any  changes to the diff --git a/docs/content/cookbook/index.ngdoc b/docs/content/cookbook/index.ngdoc index 43ac9bb2..45ba2123 100644 --- a/docs/content/cookbook/index.ngdoc +++ b/docs/content/cookbook/index.ngdoc @@ -44,7 +44,7 @@ allowing you to send links to specific screens in your app.  # 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  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 diff --git a/docs/content/cookbook/mvc.ngdoc b/docs/content/cookbook/mvc.ngdoc index da8f48e2..c362174c 100644 --- a/docs/content/cookbook/mvc.ngdoc +++ b/docs/content/cookbook/mvc.ngdoc @@ -125,4 +125,4 @@ board variable.  * The view can call any controller function.  * 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 -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. diff --git a/docs/content/guide/bootstrap.ngdoc b/docs/content/guide/bootstrap.ngdoc index b2c681b5..383aabf5 100644 --- a/docs/content/guide/bootstrap.ngdoc +++ b/docs/content/guide/bootstrap.ngdoc @@ -41,26 +41,26 @@ initialization.    * If you chose to use the old style directive syntax `ng:` then include xml-namespace in `html`      to make IE happy. (This is here for historical resons, and we no longer recomend use of      `ng:`.) -     +          <html xmlns:ng="http://angularjs.org"> -   -   + +  # Automatic Initialization  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 -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:    * load the {@link guide/module module} associated with the directive. -  * create the application {@link api/angular.module.AUTO.$injector injector} -  * compile the DOM treating the {@link api/angular.module.ng.$compileProvider.directive.ngApp +  * create the application {@link api/AUTO.$injector injector} +  * 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      portion of the DOM as an Angular application. -     +  <pre>  <!doctype html>  <html ng-app="optionalModuleName"> @@ -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 -api/angular.module.ng.$compileProvider.directive.ngApp ng-app} directive. +api/ng.directive:ngApp ng-app} directive.  <pre>  <!doctype html> diff --git a/docs/content/guide/compiler.ngdoc b/docs/content/guide/compiler.ngdoc index 493b611f..afd4d115 100644 --- a/docs/content/guide/compiler.ngdoc +++ b/docs/content/guide/compiler.ngdoc @@ -4,10 +4,10 @@  # 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  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.  For example if something needs to be centered, there is no need to provide instructions to the @@ -17,7 +17,7 @@ element to achieve the desired behavior. Such is the power of declarative langua  But the declarative language is also limited, since it does not allow you to teach the browser new  syntax. For example there is no easy way to get the browser to align the text at 1/3 the position -instead of 1/2. What is needed is a way to teach browser new HTML syntax.  +instead of 1/2. What is needed is a way to teach browser new HTML syntax.  Angular comes pre-bundled with common directives which are useful for building any app. We also  expect that you will create directives that are specific to your app. These extension become a @@ -29,7 +29,7 @@ involved.  # Compiler -Compiler is an angular service which traverses the DOM looking for attributes. The compilation  +Compiler is an angular service which traverses the DOM looking for attributes. The compilation  process happens into two phases.    1. **Compile:** traverse the DOM and collect all of the directives. The result is a linking @@ -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    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  improves performance since the cloned template only needs to be compiled once, and then linked  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  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 -api/angular.module.ng.$compileProvider.directive.ngBind `ng-bind`} directive. +api/ng.directive:ngBind `ng-bind`} directive.  <pre>    <span ng-bind="exp"></span> @@ -60,7 +60,7 @@ api/angular.module.ng.$compileProvider.directive.ngBind `ng-bind`} directive.  </pre>  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.  Here is a directive which makes any element draggable. Notice the `draggable` attribute on the @@ -115,9 +115,9 @@ principles.  # Understanding View -There are many templating systems out there. Most of them consume a static string template and  +There are many templating systems out there. Most of them consume a static string template and  combine it with data, resulting in a new string. The resulting text is then `innerHTML`ed into -an element.  +an element.  <img src="img/One_Way_Data_Binding.png"> diff --git a/docs/content/guide/dev_guide.e2e-testing.ngdoc b/docs/content/guide/dev_guide.e2e-testing.ngdoc index bc048094..7cb04841 100644 --- a/docs/content/guide/dev_guide.e2e-testing.ngdoc +++ b/docs/content/guide/dev_guide.e2e-testing.ngdoc @@ -78,19 +78,19 @@ Returns the window.location.search of the currently loaded page in the test fram  Returns the window.location.hash (without `#`) of the currently loaded page in the test frame.  ## browser().location().url() -Returns the {@link api/angular.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.  ## 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.  ## 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.  ## 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.  ## expect(future).{matcher} diff --git a/docs/content/guide/dev_guide.mvc.understanding_controller.ngdoc b/docs/content/guide/dev_guide.mvc.understanding_controller.ngdoc index ce3c74e3..df7db2e2 100644 --- a/docs/content/guide/dev_guide.mvc.understanding_controller.ngdoc +++ b/docs/content/guide/dev_guide.mvc.understanding_controller.ngdoc @@ -4,7 +4,7 @@  In angular, a controller is a JavaScript function(type/class) that is used to augment instances of  angular {@link 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  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  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 -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 @@ -68,9 +68,9 @@ instances).  # Associating Controllers with Angular Scope Objects -You can associate controllers with scope objects explicitly via the {@link api/angular.module.ng.$rootScope.Scope#$new -scope.$new} api or implicitly via the {@link api/angular.module.ng.$compileProvider.directive.ngController ngController -directive} or {@link api/angular.module.ng.$route $route service}. +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/ng.directive:ngController ngController +directive} or {@link api/ng.$route $route service}.  ## Controller Constructor and Methods Example @@ -157,7 +157,7 @@ input box) in the second button.  ## 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:  <pre> diff --git a/docs/content/guide/dev_guide.mvc.understanding_model.ngdoc b/docs/content/guide/dev_guide.mvc.understanding_model.ngdoc index 1853e385..80e4139b 100644 --- a/docs/content/guide/dev_guide.mvc.understanding_model.ngdoc +++ b/docs/content/guide/dev_guide.mvc.understanding_model.ngdoc @@ -30,7 +30,7 @@ occurs in controllers:           <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):           <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  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> diff --git a/docs/content/guide/dev_guide.mvc.understanding_view.ngdoc b/docs/content/guide/dev_guide.mvc.understanding_view.ngdoc index 7c6b2e5a..71ee81b0 100644 --- a/docs/content/guide/dev_guide.mvc.understanding_view.ngdoc +++ b/docs/content/guide/dev_guide.mvc.understanding_view.ngdoc @@ -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.  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 -ngController} and {@link api/angular.module.ng.$compileProvider.directive.ngView ngView}, and through bindings of this form: +controller through angular directives, such as {@link api/ng.directive:ngController +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  controller function. diff --git a/docs/content/guide/dev_guide.services.$location.ngdoc b/docs/content/guide/dev_guide.services.$location.ngdoc index 209b3abc..b13a47d1 100644 --- a/docs/content/guide/dev_guide.services.$location.ngdoc +++ b/docs/content/guide/dev_guide.services.$location.ngdoc @@ -89,7 +89,7 @@ setter methods that allow you to get or change the current URL in the browser.  ## $location service configuration  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 /> @@ -134,7 +134,7 @@ current URL without creating a new browser history record you can call:  </pre>  Note that the setters don't update `window.location` immediately. Instead, `$location` service is -aware of the {@link api/angular.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  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 @@ -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  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 -`$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  notified.  When you change the `$location` inside the `$digest` phase everything is ok; `$location` will @@ -513,7 +513,7 @@ hashPrefix.  # Testing with the $location service  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>  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  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  (e.g. `locationPath`) with two watchers which push $location updates in both directions. For  example: @@ -634,7 +634,7 @@ $scope.$watch('$location.path()', function(path) {  # Related API -* {@link api/angular.module.ng.$location $location API} +* {@link api/ng.$location $location API} diff --git a/docs/content/guide/dev_guide.services.creating_services.ngdoc b/docs/content/guide/dev_guide.services.creating_services.ngdoc index 891b4dd0..060ab38f 100644 --- a/docs/content/guide/dev_guide.services.creating_services.ngdoc +++ b/docs/content/guide/dev_guide.services.creating_services.ngdoc @@ -5,7 +5,7 @@  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  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  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  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:  Using the angular.Module api: @@ -101,4 +101,4 @@ important.  ## Related API -* {@link api/angular.module.ng Angular Service API} +* {@link api/ng Angular Service API} diff --git a/docs/content/guide/dev_guide.services.injecting_controllers.ngdoc b/docs/content/guide/dev_guide.services.injecting_controllers.ngdoc index ff674369..2da7c248 100644 --- a/docs/content/guide/dev_guide.services.injecting_controllers.ngdoc +++ b/docs/content/guide/dev_guide.services.injecting_controllers.ngdoc @@ -115,4 +115,4 @@ dependencies with the `$inject` property.  ## Related API -{@link api/angular.module.ng Angular Service API} +{@link api/ng Angular Service API} diff --git a/docs/content/guide/dev_guide.services.managing_dependencies.ngdoc b/docs/content/guide/dev_guide.services.managing_dependencies.ngdoc index 01c26146..54d7a5d1 100644 --- a/docs/content/guide/dev_guide.services.managing_dependencies.ngdoc +++ b/docs/content/guide/dev_guide.services.managing_dependencies.ngdoc @@ -88,10 +88,10 @@ provided by Angular's web framework:  Things to notice in this example: -* The `batchLog` service depends on the built-in {@link api/angular.module.ng.$defer $defer} and -{@link api/angular.module.ng.$log $log} services, and allows messages to be logged into the +* The `batchLog` service depends on the built-in {@link api/ng.$defer $defer} and +{@link api/ng.$log $log} services, and allows messages to be logged into the  `console.log` in batches. -* The `routeTemplateMonitor` service depends on the built-in {@link api/angular.module.ng.$route +* The `routeTemplateMonitor` service depends on the built-in {@link api/ng.$route  $route} service as well as our custom `batchLog` service.  * 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 @@ -110,5 +110,5 @@ that the injector uses to determine which services and in which order to inject.  ## Related API -* {@link api/angular.module.ng Angular Service API} +* {@link api/ng Angular Service API}  * {@link api/angular.injector Angular Injector API} diff --git a/docs/content/guide/dev_guide.services.ngdoc b/docs/content/guide/dev_guide.services.ngdoc index 022f541a..a090146a 100644 --- a/docs/content/guide/dev_guide.services.ngdoc +++ b/docs/content/guide/dev_guide.services.ngdoc @@ -18,4 +18,4 @@ most often used with {@link di dependency injection}, also a key feature of angu  ## Related API -* {@link api/angular.module.ng Angular Service API} +* {@link api/ng Angular Service API} diff --git a/docs/content/guide/dev_guide.services.testing_services.ngdoc b/docs/content/guide/dev_guide.services.testing_services.ngdoc index d867215b..d6e5e4ce 100644 --- a/docs/content/guide/dev_guide.services.testing_services.ngdoc +++ b/docs/content/guide/dev_guide.services.testing_services.ngdoc @@ -59,4 +59,4 @@ it('should clear messages after alert', function() {  ## Related API -* {@link api/angular.module.ng Angular Service API} +* {@link api/ng Angular Service API} diff --git a/docs/content/guide/dev_guide.services.understanding_services.ngdoc b/docs/content/guide/dev_guide.services.understanding_services.ngdoc index d7a8a0f4..a580c2a5 100644 --- a/docs/content/guide/dev_guide.services.understanding_services.ngdoc +++ b/docs/content/guide/dev_guide.services.understanding_services.ngdoc @@ -3,7 +3,7 @@  @description  Angular services are singletons that carry out specific tasks common to web apps, such as the -{@link api/angular.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.  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 -* {@link api/angular.module.ng Angular Service API} +* {@link api/ng Angular Service API}  * {@link api/angular.injector Injector API} diff --git a/docs/content/guide/dev_guide.templates.css-styling.ngdoc b/docs/content/guide/dev_guide.templates.css-styling.ngdoc index 1a2b2ac5..f88ec6f3 100644 --- a/docs/content/guide/dev_guide.templates.css-styling.ngdoc +++ b/docs/content/guide/dev_guide.templates.css-styling.ngdoc @@ -9,10 +9,10 @@ Angular sets these CSS classes. It is up to your application to provide useful s  * `ng-invalid`, `ng-valid`    - **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` -  - **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      the input widget the class is changed to `ng-dirty`. diff --git a/docs/content/guide/dev_guide.templates.filters.creating_filters.ngdoc b/docs/content/guide/dev_guide.templates.filters.creating_filters.ngdoc index b21e6f0c..b497a086 100644 --- a/docs/content/guide/dev_guide.templates.filters.creating_filters.ngdoc +++ b/docs/content/guide/dev_guide.templates.filters.creating_filters.ngdoc @@ -57,4 +57,4 @@ text upper-case and assigns color.  ## Related API -* {@link api/angular.module.ng.$filter Angular Filter API} +* {@link api/ng.$filter Angular Filter API} diff --git a/docs/content/guide/dev_guide.templates.filters.ngdoc b/docs/content/guide/dev_guide.templates.filters.ngdoc index 0308edb2..9456ad18 100644 --- a/docs/content/guide/dev_guide.templates.filters.ngdoc +++ b/docs/content/guide/dev_guide.templates.filters.ngdoc @@ -12,7 +12,7 @@ displaying it to the user. You can pass expressions through a chain of filters l          name | uppercase  The expression evaluator simply passes the value of name to -{@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  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 -* {@link api/angular.module.ng.$filter Angular Filter API} +* {@link api/ng.$filter Angular Filter API} diff --git a/docs/content/guide/dev_guide.templates.filters.using_filters.ngdoc b/docs/content/guide/dev_guide.templates.filters.using_filters.ngdoc index a159e1f5..9de4c943 100644 --- a/docs/content/guide/dev_guide.templates.filters.using_filters.ngdoc +++ b/docs/content/guide/dev_guide.templates.filters.using_filters.ngdoc @@ -2,7 +2,7 @@  @name Developer Guide: Templates: Filters: Using Angular Filters  @description -Filters can be part of any {@link api/angular.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:          {{ expression | filter }} @@ -37,4 +37,4 @@ argument that specifies how many digits to display to the right of the decimal p  ## Related API -* {@link api/angular.module.ng.$filter Angular Filter API} +* {@link api/ng.$filter Angular Filter API} diff --git a/docs/content/guide/dev_guide.templates.ngdoc b/docs/content/guide/dev_guide.templates.ngdoc index f0c0f280..c349f9e2 100644 --- a/docs/content/guide/dev_guide.templates.ngdoc +++ b/docs/content/guide/dev_guide.templates.ngdoc @@ -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    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.  * {@link dev_guide.templates.filters Filter} — Formats your data for display to the user.  * {@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 just one HTML file (usually `index.html`). In a more complex app, you can display multiple views  within one main page using "partials", which are segments of template located in separate HTML -files.  You "include" the partials in the main page using the {@link api/angular.module.ng.$route -$route} service in conjunction with the {@link api/angular.module.ng.$compileProvider.directive.ngView ngView} directive. An +files.  You "include" the partials in the main page using the {@link api/ng.$route +$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  eight. diff --git a/docs/content/guide/dev_guide.unit-testing.ngdoc b/docs/content/guide/dev_guide.unit-testing.ngdoc index 2083f2e4..fe3db075 100644 --- a/docs/content/guide/dev_guide.unit-testing.ngdoc +++ b/docs/content/guide/dev_guide.unit-testing.ngdoc @@ -247,7 +247,7 @@ that such a test tells a story, rather then asserting random bits which don't se  ## 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  logic, further simplifying the application logic. diff --git a/docs/content/guide/directive.ngdoc b/docs/content/guide/directive.ngdoc index 8657a5d4..975eab1f 100644 --- a/docs/content/guide/directive.ngdoc +++ b/docs/content/guide/directive.ngdoc @@ -55,11 +55,11 @@ the following example.  # String interpolation -During the compilation process the {@link api/angular.module.ng.$compile compiler} matches text and -attributes using the {@link api/angular.module.ng.$interpolate $interpolate} service to see if they +During the compilation process the {@link api/ng.$compile compiler} matches text and +attributes using the {@link api/ng.$interpolate $interpolate} service to see if they  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/angular.module.ng.$rootScope.Scope#$digest digest} cycle. An example of interpolation is shown +api/ng.$rootScope.Scope#$watch watches} and will update as part of normal {@link +api/ng.$rootScope.Scope#$digest digest} cycle. An example of interpolation is shown  here:  <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    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    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()`    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 -  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    functions.    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    register any listeners on the elements and set up any {@link -  api/angular.module.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#$watch watches} with the {@link +  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.  <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.  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 -api/angular.module.ng.$compileProvider.directive.ngRepeat ngRepeat} is another directive. But {@link -api/angular.module.ng.$compileProvider.directive.ngRepeat ngRepeat} has a dilemma. It needs to be +`{{user}}` is an example of {@link api/ng.$interpolate interpolation} directive. {@link +api/ng.directive:ngRepeat ngRepeat} is another directive. But {@link +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  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  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.  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 @@ -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 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. -{@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 -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  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 -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`.  Summary: @@ -288,14 +288,14 @@ further simplification:  ## Factory method  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 -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.  ## 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:    * `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.    * `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      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` @@ -412,8 +412,8 @@ compiler}. The attributes are:  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  directives which transform template DOM such as {@link -api/angular.module.ng.$compileProvider.directive.ngRepeat ngRepeat} or load the contents -asynchronously such as {@link api/angular.module.ng.$compileProvider.directive.ngView ngView}. The +api/ng.directive:ngRepeat ngRepeat} or load the contents +asynchronously such as {@link api/ng.directive:ngView ngView}. The  compile functions takes the following arguments.    * `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  put. -  * `scope` - {@link api/angular.module.ng.$rootScope.Scope Scope} - The scope to be used by the -    directive for registering {@link api/angular.module.ng.$rootScope.Scope#$watch watches}. +  * `scope` - {@link api/ng.$rootScope.Scope Scope} - The scope to be used by the +    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      manipulate the children of the element only in `postLink` function since the children have diff --git a/docs/content/guide/expression.ngdoc b/docs/content/guide/expression.ngdoc index 28edcc22..770e356e 100644 --- a/docs/content/guide/expression.ngdoc +++ b/docs/content/guide/expression.ngdoc @@ -3,7 +3,7 @@  @description  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.  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  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  <doc:example> @@ -92,7 +92,7 @@ You can try evaluating different expressions here:  # Property Evaluation  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  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). @@ -162,7 +162,7 @@ of filters like this:         name | uppercase  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: diff --git a/docs/content/guide/forms.ngdoc b/docs/content/guide/forms.ngdoc index c21ffc93..b3bfcb30 100644 --- a/docs/content/guide/forms.ngdoc +++ b/docs/content/guide/forms.ngdoc @@ -12,9 +12,9 @@ Server-side validation is still necessary for a secure application.  # 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. -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: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 -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. -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.  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 -Angular provides basic implementation for most common html5 {@link api/angular.module.ng.$compileProvider.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`). +Angular provides basic implementation for most common html5 {@link api/ng.directive:input input} +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.  The validation can occur in two places:    * **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** - -    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}. -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}. +    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/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. @@ -273,12 +273,12 @@ In the following example we create two directives.  # 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.  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.  See {@link guide/directive $compileProvider.directive} for more info. diff --git a/docs/content/guide/i18n.ngdoc b/docs/content/guide/i18n.ngdoc index ba88a2e7..946f16c0 100644 --- a/docs/content/guide/i18n.ngdoc +++ b/docs/content/guide/i18n.ngdoc @@ -17,15 +17,15 @@ abstracted bits.  **What level of support for i18n/l10n is currently in Angular?**  Currently, Angular supports i18n/l10n for {@link -http://docs.angularjs.org/#!/api/angular.module.ng.$filter.date datetime}, {@link -http://docs.angularjs.org/#!/api/angular.module.ng.$filter.number number} and {@link -http://docs.angularjs.org/#!/api/angular.module.ng.$filter.currency currency} filters. +http://docs.angularjs.org/#!/api/ng.filter:date datetime}, {@link +http://docs.angularjs.org/#!/api/ng.filter:number number} and {@link +http://docs.angularjs.org/#!/api/ng.filter:currency currency} filters.  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 -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  use Angular filters with various locale rule sets. You can find these examples either on {@link @@ -90,8 +90,8 @@ because an extra script needs to be loaded.  **Currency symbol "gotcha"** -Angular's {@link http://docs.angularjs.org/#!/api/angular.module.ng.$filter.currency currency filter} allows -you to use the default currency symbol from the {@link api/angular.module.ng.$locale locale service}, +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/ng.$locale locale service},  or you can provide the filter with a custom currency symbol. If your app will be used only in one  locale, it is fine to rely on the default currency symbol. However, if you anticipate that viewers  in other locales might use your app, you should provide your own currency symbol to make sure the @@ -104,7 +104,7 @@ browser will specify the locale as ja, and the balance of '¥1000.00' will be sh  will really upset your client.  In this case, you need to override the default currency symbol by providing the {@link -http://docs.angularjs.org/#!/api/angular.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,  Angular will always show a balance of 'USD$1000' and disregard any locale changes. diff --git a/docs/content/guide/overview.ngdoc b/docs/content/guide/overview.ngdoc index 71eb90e9..88dba5cc 100644 --- a/docs/content/guide/overview.ngdoc +++ b/docs/content/guide/overview.ngdoc @@ -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      variables of the same name. Think of those variables as the "Model" component of the      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      leave the the input fields blank. These new widget behavior make it easier to implement field      validation common in CRUD applications. diff --git a/docs/content/guide/scope.ngdoc b/docs/content/guide/scope.ngdoc index dac69d8a..ac0089c9 100644 --- a/docs/content/guide/scope.ngdoc +++ b/docs/content/guide/scope.ngdoc @@ -4,32 +4,32 @@  # 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  arranged in hierarchical structure which mimic the DOM structure of the application. Scopes can  watch {@link guide/expression expressions} and propagate events.  ## 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. -  - 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      realm" (controllers, services, Angular event handlers).    - Scopes can be nested to isolate application components while providing access to shared model      properties. A scope (prototypically) inherits properties from its parent scope. -  - Scopes provide context against which {@link guide/expression expressions} are evaluated. For  +  - Scopes provide context against which {@link guide/expression expressions} are evaluated. For      example `{{username}}` expression is meaningless, unless it is evaluated against a specific      scope which defines the `username` property.  ## Scope as Data-Model  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 -{@link api/angular.module.ng.$rootScope.Scope#$watch `$watch`} expressions on the scope. The +linking} phase the {@link api/ng.$compileProvider.directive directives} set up +{@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  render the updated value to the DOM. @@ -102,7 +102,7 @@ to test the behavior without being distracted by the rendering details.  ## 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.  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  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 -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,  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  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/angular.module.ng.$rootScope.Scope#$emit emitted} to scope parents. +api/ng.$rootScope.Scope#$broadcast broadcasted} to the scope children or {@link +api/ng.$rootScope.Scope#$emit emitted} to scope parents.  <example>    <file name="script.js"> @@ -225,14 +225,14 @@ more events.  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  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  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.  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  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 @@ -243,27 +243,27 @@ the `$digest` phase. This delay is desirable, since it coalesces multiple model    1. **Creation** -     The {@link api/angular.module.ng.$rootScope root scope} is created during the application -     bootstrap by the {@link api/angular.module.AUTO.$injector $injector}. During template +     The {@link api/ng.$rootScope root scope} is created during the application +     bootstrap by the {@link api/AUTO.$injector $injector}. During template       linking, some directives create new child scopes.    2. **Watcher registration**       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.    3. **Model mutation**       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, -     or asynchronous work with {@link api/angular.module.ng.$http $http} or {@link -     api/angular.module.ng.$defer $defer} services. +     or asynchronous work with {@link api/ng.$http $http} or {@link +     api/ng.$defer $defer} services.    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       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. @@ -271,7 +271,7 @@ the `$digest` phase. This delay is desirable, since it coalesces multiple model    5. **Scope destruction**       When child scopes are no longer needed, it is the responsibility of the child scope creator -     to destroy them via {@link api/angular.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       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  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: -  - 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 -    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. -  - 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      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  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.  ### 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 -api/angular.module.ng.$compileProvider.directive.ngController ng-controller} and {@link -api/angular.module.ng.$compileProvider.directive.ngRepeat ng-repeat}, create new child scopes +api/ng.directive:ngController ng-controller} and {@link +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  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:     - 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 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. -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. diff --git a/docs/content/misc/faq.ngdoc b/docs/content/misc/faq.ngdoc index 1d2deac2..f32333e8 100644 --- a/docs/content/misc/faq.ngdoc +++ b/docs/content/misc/faq.ngdoc @@ -68,7 +68,7 @@ manipulate the DOM.  ### What is testability like in angular?  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? diff --git a/docs/content/tutorial/step_00.ngdoc b/docs/content/tutorial/step_00.ngdoc index 92f60991..7565595d 100644 --- a/docs/content/tutorial/step_00.ngdoc +++ b/docs/content/tutorial/step_00.ngdoc @@ -184,7 +184,7 @@ __`app/index.html`:__    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 -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  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: -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. -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.  3. Angular will then "compile" the DOM starting at the `ngApp` root element, processing any diff --git a/docs/content/tutorial/step_02.ngdoc b/docs/content/tutorial/step_02.ngdoc index 03c7a852..766a3869 100644 --- a/docs/content/tutorial/step_02.ngdoc +++ b/docs/content/tutorial/step_02.ngdoc @@ -52,7 +52,7 @@ __`app/index.html`:__  </pre>  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:  `{{phone.name}}` and `{{phone.snippet}}`: @@ -96,7 +96,7 @@ as follows:  * `PhoneListCtrl` — the name of our controller function (located in the JavaScript file  `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.  * 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  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 diff --git a/docs/content/tutorial/step_03.ngdoc b/docs/content/tutorial/step_03.ngdoc index 26bb9d5f..a08561f9 100644 --- a/docs/content/tutorial/step_03.ngdoc +++ b/docs/content/tutorial/step_03.ngdoc @@ -55,7 +55,7 @@ __`app/index.html`:__  </pre>  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.  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"> -* 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`.    `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  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 -ngBind} or {@link api/angular.module.ng.$compileProvider.directive.ngBindTemplate +solution would be to use the {@link api/ng.directive:ngBind +ngBind} or {@link api/ng.directive:ngBindTemplate  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> diff --git a/docs/content/tutorial/step_04.ngdoc b/docs/content/tutorial/step_04.ngdoc index ca452b59..2542e21f 100644 --- a/docs/content/tutorial/step_04.ngdoc +++ b/docs/content/tutorial/step_04.ngdoc @@ -47,7 +47,7 @@ two provided sorting options.        <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  array, copies it and reorders the copy which is then returned. diff --git a/docs/content/tutorial/step_05.ngdoc b/docs/content/tutorial/step_05.ngdoc index e0e6c1fe..ef8c28ba 100644 --- a/docs/content/tutorial/step_05.ngdoc +++ b/docs/content/tutorial/step_05.ngdoc @@ -6,8 +6,8 @@  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 -api/angular.module.ng.$http $http}. We will use angular's {@link guide/di dependency +from our server using one of angular's built-in {@link api/ng services} called {@link +api/ng.$http $http}. We will use angular's {@link guide/di dependency  injection (DI)} to provide the service to the `PhoneListCtrl` controller. @@ -42,9 +42,9 @@ Following is a sample of the file:  ## 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 -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.  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  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  scope controlled by this controller, as a model called `phones`. Notice that angular detected the  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 used the `inject` helper method to inject instances of -{@link api/angular.module.ng.$rootScope $rootScope}, -{@link api/angular.module.ng.$controller $controller} and -{@link api/angular.module.ng.$httpBackend $httpBackend} services into the Jasmine's `beforeEach` +{@link api/ng.$rootScope $rootScope}, +{@link api/ng.$controller $controller} and +{@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  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. diff --git a/docs/content/tutorial/step_06.ngdoc b/docs/content/tutorial/step_06.ngdoc index 524b6a01..84c97bab 100644 --- a/docs/content/tutorial/step_06.ngdoc +++ b/docs/content/tutorial/step_06.ngdoc @@ -61,7 +61,7 @@ now-familiar double-curly brace binding in the `href` attribute values. In step  the element attribute.  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  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}}">`). diff --git a/docs/content/tutorial/step_07.ngdoc b/docs/content/tutorial/step_07.ngdoc index f0812278..01c58c13 100644 --- a/docs/content/tutorial/step_07.ngdoc +++ b/docs/content/tutorial/step_07.ngdoc @@ -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.  Application routes in angular are declared via the -{@link api/angular.module.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.$routeProvider $routeProvider}, which is the provider of the +{@link api/ng.$route $route service}. This service makes it easy to wire together  controllers, view templates, and the current  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 @@ -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  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 -{@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 -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:  __`app/index.html`:__ @@ -134,7 +134,7 @@ function PhoneDetailCtrl($scope, $routeParams) {  ## 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  route into the layout template, which makes it a perfect fit for our `index.html` template. diff --git a/docs/content/tutorial/step_08.ngdoc b/docs/content/tutorial/step_08.ngdoc index 3892abdf..563fff98 100644 --- a/docs/content/tutorial/step_08.ngdoc +++ b/docs/content/tutorial/step_08.ngdoc @@ -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  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.  The most important changes are listed below. You can see the full diff on {@link diff --git a/docs/content/tutorial/step_09.ngdoc b/docs/content/tutorial/step_09.ngdoc index 86e4ffc6..67accf25 100644 --- a/docs/content/tutorial/step_09.ngdoc +++ b/docs/content/tutorial/step_09.ngdoc @@ -121,7 +121,7 @@ output.  # 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`:    * `{{ "lower cap string" | uppercase }}`    * `{{ {foo: "bar", baz: 23} | json }}` diff --git a/docs/content/tutorial/step_10.ngdoc b/docs/content/tutorial/step_10.ngdoc index 85c14072..b674f280 100644 --- a/docs/content/tutorial/step_10.ngdoc +++ b/docs/content/tutorial/step_10.ngdoc @@ -63,7 +63,7 @@ __`app/partials/phone-detail.html`:__  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  use the `setImage` event handler function to change the value of the `mainImageUrl` property to the  url of the thumbnail image. diff --git a/docs/content/tutorial/step_11.ngdoc b/docs/content/tutorial/step_11.ngdoc index 0efc5bfb..b5bd2fbe 100644 --- a/docs/content/tutorial/step_11.ngdoc +++ b/docs/content/tutorial/step_11.ngdoc @@ -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  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 -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  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  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  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  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 -`Phone`. Angular's {@link api/angular.module.ngResource.$resource `$resource`} service is easier to +lower-level {@link api/ng.$http $http} service, replacing it with a new service called +`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  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  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`  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 diff --git a/docs/spec/ngdocSpec.js b/docs/spec/ngdocSpec.js index b591a7de..0a7979f2 100644 --- a/docs/spec/ngdocSpec.js +++ b/docs/spec/ngdocSpec.js @@ -203,17 +203,17 @@ describe('ngdoc', function() {    describe('merge', 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 methodA = new Doc({name: 'methodA', methodOf: 'angular.module.ng.abc'}); -      var methodB = new Doc({name: 'methodB', methodOf: 'angular.module.ng.abc'}); -      var propA = new Doc({name: 'propA', propertyOf: 'angular.module.ng.abc'}); -      var propB = new Doc({name: 'propB', propertyOf: 'angular.module.ng.abc'}); -      var eventA = new Doc({name: 'eventA', eventOf: 'angular.module.ng.abc'}); -      var eventB = new Doc({name: 'eventB', eventOf: 'angular.module.ng.abc'}); +      var parent = new Doc({id: 'ng.abc', name: 'ng.abc', section: 'api'}); +      var methodA = new Doc({name: 'methodA', methodOf: 'ng.abc'}); +      var methodB = new Doc({name: 'methodB', methodOf: 'ng.abc'}); +      var propA = new Doc({name: 'propA', propertyOf: 'ng.abc'}); +      var propB = new Doc({name: 'propB', propertyOf: 'ng.abc'}); +      var eventA = new Doc({name: 'eventA', eventOf: 'ng.abc'}); +      var eventB = new Doc({name: 'eventB', eventOf: 'ng.abc'});        var docs = [methodB, methodA, eventB, eventA, propA, propB, parent]; // keep wrong order;        ngdoc.merge(docs);        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].events).toEqual([eventA, eventB]);        expect(docs[0].properties).toEqual([propA, propB]); @@ -283,8 +283,8 @@ describe('ngdoc', function() {          expect(doc.requires).toEqual([            {name:'$service', text:'<p>for \n<code>A</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/angular.module.ng.$another">$another</a>'); +        expect(doc.html()).toContain('<a href="api/ng.$service">$service</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 <code>B</code></p>');        }); diff --git a/docs/src/ngdoc.js b/docs/src/ngdoc.js index 441ea2c8..5517fa93 100644 --- a/docs/src/ngdoc.js +++ b/docs/src/ngdoc.js @@ -101,7 +101,7 @@ Doc.prototype = {      var self = this,        IS_URL = /^(https?:\/\/|ftps?:\/\/|mailto:|\.|\/)/, -      IS_ANGULAR = /^(api\/)?angular\./, +      IS_ANGULAR = /^(api\/)?(angular|ng|AUTO)\./,        IS_HASH = /^#/,        parts = trim(text).split(/(<pre>[\s\S]*?<\/pre>|<doc:example(\S*).*?>[\s\S]*?<\/doc:example>|<example[^>]*>[\s\S]*?<\/example>)/),        seq = 0, @@ -201,7 +201,7 @@ Doc.prototype = {        }      });      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.file||'').match(/.*\/([^\/]*)\.ngdoc/)||{})[1]) || // try to extract it from file name        this.name; // default to name @@ -277,7 +277,7 @@ Doc.prototype = {        }        dom.h('Dependencies', self.requires, function(require){          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);        }); @@ -622,14 +622,15 @@ Doc.prototype = {  ////////////////////////////////////////////////////////// -var GLOBALS = /^angular\.([^\.]*)$/, -  MODULE = /^angular\.module\.([^\.]*)$/, -  MODULE_MOCK = /^angular\.mock\.([^\.]*)$/, -  MODULE_DIRECTIVE = /^angular\.module\.([^\.]*)(?:\.\$compileProvider)?\.directive\.([^\.]*)$/, -  MODULE_DIRECTIVE_INPUT = /^angular\.module\.([^\.]*)\.\$compileProvider\.directive\.input\.([^\.]*)$/, -  MODULE_FILTER = /^angular\.module\.([^\.]*)\.\$?filter\.([^\.]*)$/, -  MODULE_SERVICE = /^angular\.module\.([^\.]*)\.([^\.]*?)(Provider)?$/, -  MODULE_TYPE = /^angular\.module\.([^\.]*)\..*\.([A-Z][^\.]*)$/; +var GLOBALS = /^angular\.([^\.]+)$/, +    MODULE = /^((?:(?!^angular\.)[^\.])+)$/, +    MODULE_MOCK = /^angular\.mock\.([^\.]+)$/, +    MODULE_DIRECTIVE = /^((?:(?!^angular\.)[^\.])+)\.directive:([^\.]+)$/, +    MODULE_DIRECTIVE_INPUT = /^((?:(?!^angular\.)[^\.])+)\.directive:input\.([^\.]+)$/, +    MODULE_FILTER = /^((?:(?!^angular\.)[^\.])+)\.filter:([^\.]+)$/, +    MODULE_SERVICE = /^((?:(?!^angular\.)[^\.])+)\.([^\.]+?)(Provider)?$/, +    MODULE_TYPE = /^((?:(?!^angular\.)[^\.])+)\..+\.([A-Z][^\.]+)$/; +  function title(text) {    if (!text) return text; @@ -728,7 +729,7 @@ function scenarios(docs){  function metadata(docs){    var pages = [];    docs.forEach(function(doc){ -    var path = (doc.name || '').split(/(\.|\:\s+)/); +    var path = (doc.name || '').split(/(\.|\:)/);      for ( var i = 1; i < path.length; i++) {        path.splice(i, 1);      } diff --git a/docs/src/templates/js/docs.js b/docs/src/templates/js/docs.js index 5bcb9f6d..2eaa7c29 100644 --- a/docs/src/templates/js/docs.js +++ b/docs/src/templates/js/docs.js @@ -229,18 +229,18 @@ docsApp.controller.DocsController = function($scope, $location, $window, $cookie    var OFFLINE_COOKIE_NAME = 'ng-offline',        DOCS_PATH = /^\/(api)|(guide)|(cookbook)|(misc)|(tutorial)/,        INDEX_PATH = /^(\/|\/index[^\.]*.html)$/, -      GLOBALS = /^angular\.([^\.]*)$/, -      MODULE = /^angular\.module\.([^\.]*)$/, -      MODULE_MOCK = /^angular\.mock\.([^\.]*)$/, -      MODULE_DIRECTIVE = /^angular\.module\.([^\.]*)(?:\.\$compileProvider)?\.directive\.([^\.]*)$/, -      MODULE_DIRECTIVE_INPUT = /^angular\.module\.([^\.]*)\.\$compileProvider\.directive\.input\.([^\.]*)$/, -      MODULE_FILTER = /^angular\.module\.([^\.]*)\.\$?filter\.([^\.]*)$/, -      MODULE_SERVICE = /^angular\.module\.([^\.]*)\.([^\.]*?)(Provider)?$/, -      MODULE_TYPE = /^angular\.module\.([^\.]*)\..*\.([A-Z][^\.]*)$/, +      GLOBALS = /^angular\.([^\.]+)$/, +      MODULE = /^((?:(?!^angular\.)[^\.])+)$/, +      MODULE_MOCK = /^angular\.mock\.([^\.]+)$/, +      MODULE_DIRECTIVE = /^((?:(?!^angular\.)[^\.])+)\.directive:([^\.]+)$/, +      MODULE_DIRECTIVE_INPUT = /^((?:(?!^angular\.)[^\.])+)\.directive:input\.([^\.]+)$/, +      MODULE_FILTER = /^((?:(?!^angular\.)[^\.])+)\.filter:([^\.]+)$/, +      MODULE_SERVICE = /^((?:(?!^angular\.)[^\.])+)\.([^\.]+?)(Provider)?$/, +      MODULE_TYPE = /^((?:(?!^angular\.)[^\.])+)\..+\.([A-Z][^\.]+)$/,        URL = {          module: 'guide/module',          directive: 'guide/directive', -        input: 'api/angular.module.ng.$compileProvider.directive.input', +        input: 'api/ng.directive:input',          filter: 'guide/dev_guide.templates.filters',          service: 'guide/dev_guide.services',          type: 'guide/types' @@ -325,22 +325,22 @@ docsApp.controller.DocsController = function($scope, $location, $window, $cookie            breadcrumb.push({ name: partialId });          } else if (match = partialId.match(MODULE)) {            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)) { -          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] });          } 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] });          } 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: match[2] });          } 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] }); +        }  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)) {            breadcrumb.push({ name: 'angular.mock.' + match[1] });          } else { @@ -405,26 +405,28 @@ docsApp.controller.DocsController = function($scope, $location, $window, $cookie          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);        } else if (match = id.match(GLOBALS)) {          module('ng').globals.push(page);        } else if (match = id.match(MODULE)) {          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)) {          module(match[1]).filters.push(page);        } else if (match = id.match(MODULE_DIRECTIVE)) {          module(match[1]).directives.push(page);        } else if (match = id.match(MODULE_DIRECTIVE_INPUT)) {          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)) {          module(match[1]).types.push(page);        } else if (match = id.match(MODULE_MOCK)) {          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) {          module = cache[name] = {            name: name, -          url: 'api/angular.module.' + name, +          url: 'api/' + name,            globals: [],            directives: [],            services: [], | 
