Permalink
Browse files

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
  • Loading branch information...
1 parent fc0b2b5 commit f16150d5f1b20b3d633b4402095ea89baa4be042 @IgorMinar IgorMinar committed Jun 12, 2012
Showing with 803 additions and 799 deletions.
  1. +1 −1 docs/content/api/{angular.module.ng.ngdoc → ng.ngdoc}
  2. +3 −3 docs/content/cookbook/deeplinking.ngdoc
  3. +3 −3 docs/content/cookbook/form.ngdoc
  4. +2 −2 docs/content/cookbook/helloworld.ngdoc
  5. +1 −1 docs/content/cookbook/index.ngdoc
  6. +1 −1 docs/content/cookbook/mvc.ngdoc
  7. +9 −9 docs/content/guide/bootstrap.ngdoc
  8. +9 −9 docs/content/guide/compiler.ngdoc
  9. +4 −4 docs/content/guide/dev_guide.e2e-testing.ngdoc
  10. +6 −6 docs/content/guide/dev_guide.mvc.understanding_controller.ngdoc
  11. +2 −2 docs/content/guide/dev_guide.mvc.understanding_model.ngdoc
  12. +2 −2 docs/content/guide/dev_guide.mvc.understanding_view.ngdoc
  13. +7 −7 docs/content/guide/dev_guide.services.$location.ngdoc
  14. +3 −3 docs/content/guide/dev_guide.services.creating_services.ngdoc
  15. +1 −1 docs/content/guide/dev_guide.services.injecting_controllers.ngdoc
  16. +4 −4 docs/content/guide/dev_guide.services.managing_dependencies.ngdoc
  17. +1 −1 docs/content/guide/dev_guide.services.ngdoc
  18. +1 −1 docs/content/guide/dev_guide.services.testing_services.ngdoc
  19. +2 −2 docs/content/guide/dev_guide.services.understanding_services.ngdoc
  20. +2 −2 docs/content/guide/dev_guide.templates.css-styling.ngdoc
  21. +1 −1 docs/content/guide/dev_guide.templates.filters.creating_filters.ngdoc
  22. +2 −2 docs/content/guide/dev_guide.templates.filters.ngdoc
  23. +2 −2 docs/content/guide/dev_guide.templates.filters.using_filters.ngdoc
  24. +3 −3 docs/content/guide/dev_guide.templates.ngdoc
  25. +1 −1 docs/content/guide/dev_guide.unit-testing.ngdoc
  26. +25 −25 docs/content/guide/directive.ngdoc
  27. +4 −4 docs/content/guide/expression.ngdoc
  28. +12 −12 docs/content/guide/forms.ngdoc
  29. +8 −8 docs/content/guide/i18n.ngdoc
  30. +1 −1 docs/content/guide/overview.ngdoc
  31. +33 −33 docs/content/guide/scope.ngdoc
  32. +1 −1 docs/content/misc/faq.ngdoc
  33. +3 −3 docs/content/tutorial/step_00.ngdoc
  34. +3 −3 docs/content/tutorial/step_02.ngdoc
  35. +4 −4 docs/content/tutorial/step_03.ngdoc
  36. +1 −1 docs/content/tutorial/step_04.ngdoc
  37. +8 −8 docs/content/tutorial/step_05.ngdoc
  38. +1 −1 docs/content/tutorial/step_06.ngdoc
  39. +5 −5 docs/content/tutorial/step_07.ngdoc
  40. +1 −1 docs/content/tutorial/step_08.ngdoc
  41. +1 −1 docs/content/tutorial/step_09.ngdoc
  42. +1 −1 docs/content/tutorial/step_10.ngdoc
  43. +6 −6 docs/content/tutorial/step_11.ngdoc
  44. +10 −10 docs/spec/ngdocSpec.js
  45. +13 −12 docs/src/ngdoc.js
  46. +24 −22 docs/src/templates/js/docs.js
  47. +3 −4 src/Angular.js
  48. +32 −32 src/auto/injector.js
  49. +1 −1 src/jqLite.js
  50. +10 −10 src/loader.js
  51. +1 −1 src/ng/anchorScroll.js
  52. +16 −16 src/ng/browser.js
  53. +3 −3 src/ng/cacheFactory.js
  54. +17 −17 src/ng/compile.js
  55. +7 −7 src/ng/controller.js
  56. +5 −5 src/ng/defer.js
  57. +7 −7 src/ng/directive/booleanAttrs.js
  58. +10 −10 src/ng/directive/form.js
  59. +31 −31 src/ng/directive/input.js
  60. +6 −6 src/ng/directive/ngBind.js
  61. +7 −7 src/ng/directive/ngClass.js
  62. +1 −1 src/ng/directive/ngCloak.js
  63. +2 −2 src/ng/directive/ngController.js
  64. +2 −2 src/ng/directive/ngCsp.js
  65. +16 −16 src/ng/directive/ngEventDirs.js
  66. +4 −4 src/ng/directive/ngInclude.js
  67. +1 −1 src/ng/directive/ngInit.js
  68. +1 −1 src/ng/directive/ngNonBindable.js
  69. +1 −1 src/ng/directive/ngPluralize.js
  70. +1 −1 src/ng/directive/ngRepeat.js
  71. +2 −2 src/ng/directive/ngShowHide.js
  72. +1 −1 src/ng/directive/ngStyle.js
  73. +1 −1 src/ng/directive/ngSwitch.js
  74. +1 −1 src/ng/directive/ngTransclude.js
  75. +4 −4 src/ng/directive/ngView.js
  76. +1 −1 src/ng/directive/script.js
  77. +2 −2 src/ng/directive/select.js
  78. +1 −1 src/ng/document.js
  79. +2 −2 src/ng/exceptionHandler.js
  80. +4 −4 src/ng/filter.js
  81. +2 −2 src/ng/filter/filter.js
  82. +6 −6 src/ng/filter/filters.js
  83. +2 −2 src/ng/filter/limitTo.js
  84. +2 −2 src/ng/filter/orderBy.js
  85. +30 −30 src/ng/http.js
  86. +4 −4 src/ng/httpBackend.js
  87. +8 −8 src/ng/interpolate.js
  88. +1 −1 src/ng/locale.js
  89. +24 −24 src/ng/location.js
  90. +9 −9 src/ng/log.js
  91. +1 −1 src/ng/parse.js
  92. +10 −10 src/ng/q.js
  93. +3 −3 src/ng/rootElement.js
  94. +93 −91 src/ng/rootScope.js
  95. +30 −30 src/ng/route.js
  96. +3 −3 src/ng/routeParams.js
  97. +1 −1 src/ng/sniffer.js
  98. +6 −6 src/ng/timeout.js
  99. +1 −1 src/ng/window.js
  100. +9 −9 src/ngCookies/cookies.js
  101. +102 −102 src/ngMock/angular-mocks.js
  102. +4 −4 src/ngResource/resource.js
  103. +3 −3 src/ngSanitize/directive/ngBindHtml.js
  104. +1 −1 src/ngSanitize/filter/linky.js
  105. +2 −2 src/ngSanitize/sanitize.js
  106. +4 −4 src/ngScenario/dsl.js
@@ -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.
@@ -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.
@@ -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.
@@ -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
@@ -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
@@ -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.
@@ -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>
@@ -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">
@@ -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}
@@ -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>
@@ -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>
@@ -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.
@@ -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}
@@ -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}
@@ -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}
Oops, something went wrong.

0 comments on commit f16150d

Please sign in to comment.