Skip to content

Commit f16150d

Browse files
committed
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
1 parent fc0b2b5 commit f16150d

File tree

106 files changed

+803
-799
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

106 files changed

+803
-799
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
@ngdoc overview
2-
@name angular.module.ng
2+
@name ng
33
@description
44

55
The `ng` is an angular module which contains all of the core angular services.

docs/content/cookbook/deeplinking.ngdoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,11 @@ In this example we have a simple app which consist of two screens:
141141
# Things to notice
142142

143143
* Routes are defined in the `AppCntl` class. The initialization of the controller causes the
144-
initialization of the {@link api/angular.module.ng.$route $route} service with the proper URL
144+
initialization of the {@link api/ng.$route $route} service with the proper URL
145145
routes.
146-
* The {@link api/angular.module.ng.$route $route} service then watches the URL and instantiates the
146+
* The {@link api/ng.$route $route} service then watches the URL and instantiates the
147147
appropriate controller when the URL changes.
148-
* The {@link api/angular.module.ng.$compileProvider.directive.ngView ngView} widget loads the
148+
* The {@link api/ng.directive:ngView ngView} widget loads the
149149
view when the URL changes. It also sets the view scope to the newly instantiated controller.
150150
* Changing the URL is sufficient to change the controller and view. It makes no difference whether
151151
the URL is changed programatically or by the user.

docs/content/cookbook/form.ngdoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,11 @@ allow a user to enter data.
102102

103103
# Things to notice
104104

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

docs/content/cookbook/helloworld.ngdoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@
2929
Take a look through the source and note:
3030

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

docs/content/cookbook/index.ngdoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ allowing you to send links to specific screens in your app.
4444

4545
# Services
4646

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

docs/content/cookbook/mvc.ngdoc

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

docs/content/guide/bootstrap.ngdoc

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,26 +41,26 @@ initialization.
4141
* If you chose to use the old style directive syntax `ng:` then include xml-namespace in `html`
4242
to make IE happy. (This is here for historical resons, and we no longer recomend use of
4343
`ng:`.)
44-
44+
4545
<html xmlns:ng="http://angularjs.org">
46-
47-
46+
47+
4848

4949
# Automatic Initialization
5050

5151
Angular initializes automatically upon `DOMContentLoaded` event, at which point angular looks for
52-
the {@link api/angular.module.ng.$compileProvider.directive.ngApp `ng-app`} directive which
52+
the {@link api/ng.directive:ngApp `ng-app`} directive which
5353
designates your application root. If {@link
54-
api/angular.module.ng.$compileProvider.directive.ngApp `ng-app`} directive is found then Angular
54+
api/ng.directive:ngApp `ng-app`} directive is found then Angular
5555
will:
5656

5757
* load the {@link guide/module module} associated with the directive.
58-
* create the application {@link api/angular.module.AUTO.$injector injector}
59-
* compile the DOM treating the {@link api/angular.module.ng.$compileProvider.directive.ngApp
58+
* create the application {@link api/AUTO.$injector injector}
59+
* compile the DOM treating the {@link api/ng.directive:ngApp
6060
`ng-app`} directive as the root of the compilation. This allows you to tell it to treat only a
6161
portion of the DOM as an Angular application.
6262

63-
63+
6464
<pre>
6565
<!doctype html>
6666
<html ng-app="optionalModuleName">
@@ -82,7 +82,7 @@ or the need to perform an operation before the Angular compiles a page.
8282

8383

8484
Here is an example of manually initializing Angular. The example is equivalent to using the {@link
85-
api/angular.module.ng.$compileProvider.directive.ngApp ng-app} directive.
85+
api/ng.directive:ngApp ng-app} directive.
8686

8787
<pre>
8888
<!doctype html>

docs/content/guide/compiler.ngdoc

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44

55
# Overview
66

7-
Angular's {@link api/angular.module.ng.$compile HTML compiler} allows the developer to teach the
7+
Angular's {@link api/ng.$compile HTML compiler} allows the developer to teach the
88
browser new HTML syntax. The compiler allows you to attach behavior to any HTML element or attribute
99
and even create new HTML element or attributes with custom behavior. Angular calls these behavior
10-
extensions {@link api/angular.module.ng.$compileProvider.directive directives}.
10+
extensions {@link api/ng.$compileProvider.directive directives}.
1111

1212
HTML has a lot of constructs for formatting the HTML for static documents in declarative fashion.
1313
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
1717

1818
But the declarative language is also limited, since it does not allow you to teach the browser new
1919
syntax. For example there is no easy way to get the browser to align the text at 1/3 the position
20-
instead of 1/2. What is needed is a way to teach browser new HTML syntax.
20+
instead of 1/2. What is needed is a way to teach browser new HTML syntax.
2121

2222
Angular comes pre-bundled with common directives which are useful for building any app. We also
2323
expect that you will create directives that are specific to your app. These extension become a
@@ -29,7 +29,7 @@ involved.
2929

3030
# Compiler
3131

32-
Compiler is an angular service which traverses the DOM looking for attributes. The compilation
32+
Compiler is an angular service which traverses the DOM looking for attributes. The compilation
3333
process happens into two phases.
3434

3535
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.
3939
scope model are reflected in the view, and any user interactions with the view are reflected
4040
in the scope model. Making the scope model a single source of truth.
4141

42-
Some directives such {@link api/angular.module.ng.$compileProvider.directive.ngRepeat
42+
Some directives such {@link api/ng.directive:ngRepeat
4343
`ng-repeat`} clone DOM elements once for each item in collection. Having a compile and link phase
4444
improves performance since the cloned template only needs to be compiled once, and then linked
4545
once for each clone instance.
@@ -50,7 +50,7 @@ once for each clone instance.
5050
Directive is a behavior which should be triggered when specific HTML constructs are encountered in
5151
compilation process. The directives can be placed in element names, attributes, class names, as
5252
well as comments. Here are some equivalent examples of invoking {@link
53-
api/angular.module.ng.$compileProvider.directive.ngBind `ng-bind`} directive.
53+
api/ng.directive:ngBind `ng-bind`} directive.
5454

5555
<pre>
5656
<span ng-bind="exp"></span>
@@ -60,7 +60,7 @@ api/angular.module.ng.$compileProvider.directive.ngBind `ng-bind`} directive.
6060
</pre>
6161

6262
Directive is just a function which executes when the compiler encounters it in the DOM. See {@link
63-
api/angular.module.ng.$compileProvider.directive directive API} for in depth documentation on how
63+
api/ng.$compileProvider.directive directive API} for in depth documentation on how
6464
to write directives.
6565

6666
Here is a directive which makes any element draggable. Notice the `draggable` attribute on the
@@ -115,9 +115,9 @@ principles.
115115

116116
# Understanding View
117117

118-
There are many templating systems out there. Most of them consume a static string template and
118+
There are many templating systems out there. Most of them consume a static string template and
119119
combine it with data, resulting in a new string. The resulting text is then `innerHTML`ed into
120-
an element.
120+
an element.
121121

122122
<img src="img/One_Way_Data_Binding.png">
123123

docs/content/guide/dev_guide.e2e-testing.ngdoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,19 +78,19 @@ Returns the window.location.search of the currently loaded page in the test fram
7878
Returns the window.location.hash (without `#`) of the currently loaded page in the test frame.
7979

8080
## browser().location().url()
81-
Returns the {@link api/angular.module.ng.$location $location.url()} of the currently loaded page in
81+
Returns the {@link api/ng.$location $location.url()} of the currently loaded page in
8282
the test frame.
8383

8484
## browser().location().path()
85-
Returns the {@link api/angular.module.ng.$location $location.path()} of the currently loaded page in
85+
Returns the {@link api/ng.$location $location.path()} of the currently loaded page in
8686
the test frame.
8787

8888
## browser().location().search()
89-
Returns the {@link api/angular.module.ng.$location $location.search()} of the currently loaded page
89+
Returns the {@link api/ng.$location $location.search()} of the currently loaded page
9090
in the test frame.
9191

9292
## browser().location().hash()
93-
Returns the {@link api/angular.module.ng.$location $location.hash()} of the currently loaded page in
93+
Returns the {@link api/ng.$location $location.hash()} of the currently loaded page in
9494
the test frame.
9595

9696
## expect(future).{matcher}

docs/content/guide/dev_guide.mvc.understanding_controller.ngdoc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
In angular, a controller is a JavaScript function(type/class) that is used to augment instances of
66
angular {@link scope Scope}, excluding the root scope. When you or angular create a new
7-
child scope object via the {@link api/angular.module.ng.$rootScope.Scope#$new scope.$new} API , there is an
7+
child scope object via the {@link api/ng.$rootScope.Scope#$new scope.$new} API , there is an
88
option to pass in a controller as a method argument. This will tell angular to associate the
99
controller with the new scope and to augment its behavior.
1010

@@ -38,7 +38,7 @@ template/view. This behavior interacts with and modifies the application model.
3838
As discussed in the {@link dev_guide.mvc.understanding_model Model} section of this guide, any
3939
objects (or primitives) assigned to the scope become model properties. Any functions assigned to
4040
the scope are available in the template/view, and can be invoked via angular expressions
41-
and `ng` event handler directives (e.g. {@link api/angular.module.ng.$compileProvider.directive.ngClick ngClick}).
41+
and `ng` event handler directives (e.g. {@link api/ng.directive:ngClick ngClick}).
4242

4343
# Using Controllers Correctly
4444

@@ -68,9 +68,9 @@ instances).
6868

6969
# Associating Controllers with Angular Scope Objects
7070

71-
You can associate controllers with scope objects explicitly via the {@link api/angular.module.ng.$rootScope.Scope#$new
72-
scope.$new} api or implicitly via the {@link api/angular.module.ng.$compileProvider.directive.ngController ngController
73-
directive} or {@link api/angular.module.ng.$route $route service}.
71+
You can associate controllers with scope objects explicitly via the {@link api/ng.$rootScope.Scope#$new
72+
scope.$new} api or implicitly via the {@link api/ng.directive:ngController ngController
73+
directive} or {@link api/ng.$route $route service}.
7474

7575

7676
## Controller Constructor and Methods Example
@@ -157,7 +157,7 @@ input box) in the second button.
157157

158158
## Controller Inheritance Example
159159

160-
Controller inheritance in angular is based on {@link api/angular.module.ng.$rootScope.Scope Scope} inheritance. Let's
160+
Controller inheritance in angular is based on {@link api/ng.$rootScope.Scope Scope} inheritance. Let's
161161
have a look at an example:
162162

163163
<pre>

0 commit comments

Comments
 (0)