chore: fix broken links on 9/30, mostly API links (#2520)

This commit is contained in:
Ward Bell 2016-10-01 07:11:21 -07:00 committed by GitHub
parent 9b083966f3
commit 56ac24b411
27 changed files with 43 additions and 113 deletions

View File

@ -4,7 +4,7 @@
"rewrites": [ "rewrites": [
{ {
"source": "/docs/dart/latest/testing", "source": "/docs/dart/latest/testing",
"destination": "/docs/dart/latest/index.html" "destination":"/docs/dart/latest/guide/testing.html"
}, },
{ {
"source": "/docs/dart/latest/tutorial", "source": "/docs/dart/latest/tutorial",
@ -12,7 +12,7 @@
}, },
{ {
"source": "/docs/js/latest/testing", "source": "/docs/js/latest/testing",
"destination": "/docs/js/latest/index.html" "destination": "/docs/js/latest/guide/testing.html"
}, },
{ {
"source": "/docs/js/latest/tutorial", "source": "/docs/js/latest/tutorial",

View File

@ -1,28 +0,0 @@
{
"_listtype": "ordered",
"index": {
"title": "Testing Overview",
"intro": "Techniques and practices for testing an Angular 2 app"
},
"jasmine-testing-101": {
"title": "Jasmine Testing 101",
"intro": "The basics of testing anything with Jasmine"
},
"application-under-test": {
"title": "The Application Under Test",
"intro": "A quick look at the application we will test"
},
"first-app-tests": {
"title": "First App Tests",
"intro": "The first test of a simple, non-Angular part of our app"
},
"testing-an-angular-pipe": {
"title": "Testing an Angular Pipe",
"intro": "We test an Angular-aware part of our app"
}
}

View File

@ -1 +0,0 @@
include ../../../_includes/_ts-temp

View File

@ -1 +0,0 @@
include ../../../_includes/_ts-temp

View File

@ -1 +0,0 @@
include ../../../_includes/_ts-temp

View File

@ -1 +0,0 @@
include ../../../_includes/_ts-temp

View File

@ -1 +0,0 @@
include ../../../_includes/_ts-temp

View File

@ -252,8 +252,7 @@ table(width="100%")
for components and directives. for components and directives.
For [inputs and outputs](../guide/template-syntax.html#inputs-outputs), For [inputs and outputs](../guide/template-syntax.html#inputs-outputs),
we use [`@Input`](../api/core/index/Input-var.html) we use `@Input` and `@Output` property decorators.
and [`@Output`](../api/core/index/Output-var.html) property decorators.
They may optionally specify input and output binding names if we want them to be They may optionally specify input and output binding names if we want them to be
different from the class property names. different from the class property names.
@ -351,10 +350,10 @@ table(width="100%")
We can attach additional decorators to constructor parameters We can attach additional decorators to constructor parameters
to qualify the injection behavior. We can mark to qualify the injection behavior. We can mark
optional dependencies with the [`@Optional`](../api/core/index/Optional-var.html), optional dependencies with the [`@Optional`](../api/core/index/Optional-decorator.html),
inject host element attributes with [`@Attribute`](../api/core/index/Attribute-var.html), inject host element attributes with [`@Attribute`](../api/core/index/Attribute-interface.html),
inject content child queries with [`@Query`](../api/core/index/Query-var.html) inject content child queries with [`@ContentChild`](../api/core/index/ContentChild-decorator.html)
and inject view child queries with [`@ViewQuery`](../api/core/index/ViewQuery-var.html)). and inject view child queries with [`@ViewChild`](../api/core/index/ViewChild-decorator.html)).
+makeExample('cb-ts-to-js/ts/app/hero-di-inject-additional.component.ts')(format="." ) +makeExample('cb-ts-to-js/ts/app/hero-di-inject-additional.component.ts')(format="." )
@ -373,8 +372,8 @@ table(width="100%")
:marked :marked
We can apply other additional parameter decorators such as We can apply other additional parameter decorators such as
[`@Host`](../api/core/index/Host-var.html) and [`@Host`](../api/core/index/Host-decorator.html) and
[`@SkipSelf`](../api/core/index/SkipSelf-var.html) in the same way - [`@SkipSelf`](../api/core/index/SkipSelf-decorator.html) in the same way -
by adding `new ng.core.Host()` or `ng.core.SkipSelf()` in the by adding `new ng.core.Host()` or `ng.core.SkipSelf()` in the
parameters array. parameters array.
@ -398,9 +397,9 @@ table(width="100%")
### Host Decorators ### Host Decorators
We can use host property decorators to bind a host element to a component or directive. We can use host property decorators to bind a host element to a component or directive.
The [`@HostBinding`](../api/core/index/HostBinding-var.html) decorator The [`@HostBinding`](../api/core/index/HostBinding-interface.html) decorator
binds host element properties to component data properties. binds host element properties to component data properties.
The [`@HostListener`](../api/core/index/HostListener-var.html) decorator bimds The [`@HostListener`](../api/core/index/HostListener-interface.html) decorator bimds
host element events to component event handlers. host element events to component event handlers.
+makeExample('cb-ts-to-js/ts/app/heroes-bindings.component.ts')(format="." ) +makeExample('cb-ts-to-js/ts/app/heroes-bindings.component.ts')(format="." )
@ -432,16 +431,16 @@ table(width="100%")
There are several property decorators for querying the descendants of There are several property decorators for querying the descendants of
a component or directive. a component or directive.
The [`@ViewChild`](../api/core/index/ViewChild-var.html) and The [`@ViewChild`](../api/core/index/ViewChild-decorator.html) and
[`@ViewChildren`](../api/core/index/ViewChildren-var.html) property decorators [`@ViewChildren`](../api/core/index/ViewChildren-decorator.html) property decorators
allow a component to query instances of other components that are used in allow a component to query instances of other components that are used in
its view. its view.
+makeExample('cb-ts-to-js/ts/app/heroes-queries.component.ts', 'view')(format="." ) +makeExample('cb-ts-to-js/ts/app/heroes-queries.component.ts', 'view')(format="." )
:marked :marked
The [`@ContentChild`](../api/core/index/ContentChild-var.html) and The [`@ContentChild`](../api/core/index/ContentChild-decorator.html) and
[`@ContentChildren`](../api/core/index/ContentChildren-var.html) property decorators [`@ContentChildren`](../api/core/index/ContentChildren-decorator.html) property decorators
allow a component to query instances of other components that have been projected allow a component to query instances of other components that have been projected
into its view from elsewhere. into its view from elsewhere.

View File

@ -485,7 +485,7 @@ figure.image-display
.l-sub-section .l-sub-section
:marked :marked
Why "ngModel"? Why "ngModel"?
A directive's [exportAs](../api/core/index/DirectiveMetadata-class.html#!#exportAs) property A directive's [exportAs](../api/core/index/Directive-decorator.html) property
tells Angular how to link the reference variable to the directive. tells Angular how to link the reference variable to the directive.
We set `name` to `ngModel` because the `ngModel` directive's `exportAs` property happens to be "ngModel". We set `name` to `ngModel` because the `ngModel` directive's `exportAs` property happens to be "ngModel".
@ -497,7 +497,7 @@ figure.image-display
:marked :marked
### The NgForm directive ### The NgForm directive
We just set a template local variable with the value of an `NgForm` directive. We just set a template local variable with the value of an `NgForm` directive.
Why did that work? We didn't add the **[`NgForm`](../api/common/index/NgForm-directive.html) directive** explicitly. Why did that work? We didn't add the **[`NgForm`](../api/forms/index/NgForm-directive.html) directive** explicitly.
Angular added it surreptitiously, wrapping it around the `<form>` element Angular added it surreptitiously, wrapping it around the `<form>` element

View File

@ -1,28 +0,0 @@
{
"_listtype": "ordered",
"index": {
"title": "Testing Overview",
"intro": "Techniques and practices for testing an Angular 2 app"
},
"jasmine-testing-101": {
"title": "Jasmine Testing 101",
"intro": "The basics of testing anything with Jasmine"
},
"application-under-test": {
"title": "The Application Under Test",
"intro": "A quick look at the application we will test"
},
"first-app-tests": {
"title": "First App Tests",
"intro": "The first test of a simple, non-Angular part of our app"
},
"testing-an-angular-pipe": {
"title": "Testing an Angular Pipe",
"intro": "We test an Angular-aware part of our app"
}
}

View File

@ -1 +0,0 @@
include ../../../_includes/_ts-temp

View File

@ -1 +0,0 @@
include ../../../_includes/_ts-temp

View File

@ -1 +0,0 @@
include ../../../_includes/_ts-temp

View File

@ -1 +0,0 @@
include ../../../_includes/_ts-temp

View File

@ -1 +0,0 @@
include ../../../_includes/_ts-temp

View File

@ -530,12 +530,11 @@ a#N
:marked :marked
Read more in the page on [pipes](!{docsLatest}/guide/pipes.html). Read more in the page on [pipes](!{docsLatest}/guide/pipes.html).
- var _ProviderUrl = docsLatest+'/api/'+(lang == 'dart' ? 'angular2.core' : 'core/index')+'/Provider-class.html'
:marked :marked
## Provider ## Provider
.l-sub-section .l-sub-section
:marked :marked
A [provider](!{_ProviderUrl}) creates a new instance of a dependency for the A _provider_ creates a new instance of a dependency for the
[dependency injection](#dependency-injection) system. [dependency injection](#dependency-injection) system.
It relates a lookup token to code&mdash;sometimes called a "recipe"&mdash;that can create a dependency value. It relates a lookup token to code&mdash;sometimes called a "recipe"&mdash;that can create a dependency value.

View File

@ -126,13 +126,13 @@ table
td All but Chrome and Firefox<br>Not supported in IE9 td All but Chrome and Firefox<br>Not supported in IE9
tr(style="vertical-align: top") tr(style="vertical-align: top")
td td
a(href="../api/common/index/DatePipe-class.html" target="_blank") Date a(href="../api/common/index/DatePipe-pipe.html" target="_blank") Date
span , span ,
a(href="../api/common/index/CurrencyPipe-class.html" target="_blank") currency a(href="../api/common/index/CurrencyPipe-pipe.html" target="_blank") currency
span , span ,
a(href="../api/common/index/DecimalPipe-class.html" target="_blank") decimal a(href="../api/common/index/DecimalPipe-pipe.html" target="_blank") decimal
span and span and
a(href="../api/common/index/PercentPipe-class.html" target="_blank") percent a(href="../api/common/index/PercentPipe-pipe.html" target="_blank") percent
span pipes span pipes
td td
:marked :marked

View File

@ -502,7 +502,7 @@ figure.image-display
.l-sub-section .l-sub-section
:marked :marked
Why "ngModel"? Why "ngModel"?
A directive's [exportAs](../api/core/index/DirectiveMetadata-class.html#!#exportAs-anchor) property A directive's [exportAs](../api/core/index/Directive-decorator.html) property
tells Angular how to link the reference variable to the directive. tells Angular how to link the reference variable to the directive.
We set `name` to `ngModel` because the `ngModel` directive's `exportAs` property happens to be "ngModel". We set `name` to `ngModel` because the `ngModel` directive's `exportAs` property happens to be "ngModel".
@ -603,7 +603,7 @@ figure.image-display
.l-sub-section .l-sub-section
:marked :marked
### The NgForm directive ### The NgForm directive
What `NgForm` directive? We didn't add an [NgForm](../api/common/index/NgForm-directive.html) directive! What `NgForm` directive? We didn't add an [NgForm](../api/forms/index/NgForm-directive.html) directive!
Angular did. Angular creates and attaches an `NgForm` directive to the `<form>` tag automatically. Angular did. Angular creates and attaches an `NgForm` directive to the `<form>` tag automatically.

View File

@ -453,7 +453,7 @@ figure.image-display
:marked :marked
The following hooks take action based on changing values *within the child view* The following hooks take action based on changing values *within the child view*
which can only be reached by querying for the child view via the property decorated with which can only be reached by querying for the child view via the property decorated with
[@ViewChild](../api/core/index/ViewChild-var.html). [@ViewChild](../api/core/index/ViewChild-decorator.html).
+makeExample('lifecycle-hooks/ts/app/after-view.component.ts', 'hooks', 'AfterViewComponent (class excerpts)')(format=".") +makeExample('lifecycle-hooks/ts/app/after-view.component.ts', 'hooks', 'AfterViewComponent (class excerpts)')(format=".")
#wait-a-tick #wait-a-tick
@ -532,7 +532,7 @@ figure.image-display
The following *AfterContent* hooks take action based on changing values in a *content child* The following *AfterContent* hooks take action based on changing values in a *content child*
which can only be reached by querying for it via the property decorated with which can only be reached by querying for it via the property decorated with
[@ContentChild](../api/core/index/ContentChild-var.html). [@ContentChild](../api/core/index/ContentChild-decorator.html).
+makeExample('lifecycle-hooks/ts/app/after-content.component.ts', 'hooks', 'AfterContentComponent (class excerpts)')(format=".") +makeExample('lifecycle-hooks/ts/app/after-content.component.ts', 'hooks', 'AfterContentComponent (class excerpts)')(format=".")

View File

@ -103,7 +103,7 @@ figure.image-display
.l-sub-section .l-sub-section
:marked :marked
Learn more about the `DatePipes` format options in the [API Docs](../api/common/index/DatePipe-class.html). Learn more about the `DatePipes` format options in the [API Docs](../api/common/index/DatePipe-pipe.html).
:marked :marked
## Chaining pipes ## Chaining pipes
@ -403,7 +403,7 @@ figure.image-display
.callout.is-helpful .callout.is-helpful
header Debugging with the json pipe header Debugging with the json pipe
:marked :marked
The [JsonPipe](../api/common/index/JsonPipe-class.html) The [JsonPipe](../api/common/index/JsonPipe-pipe.html)
provides an easy way to diagnosis a mysteriously failing data binding or provides an easy way to diagnosis a mysteriously failing data binding or
inspect an object for future binding. inspect an object for future binding.

View File

@ -1678,7 +1678,8 @@ a(href="#toc") Back to top
.s-rule.do .s-rule.do
:marked :marked
**Do** use [`@Input`](https://angular.io/docs/ts/latest/api/core/index/Input-var.html) and [`@Output`](https://angular.io/docs/ts/latest/api/core/index/Output-var.html) instead of the `inputs` and `outputs` properties of the [`@Directive`](https://angular.io/docs/ts/latest/api/core/index/Directive-decorator.html) and [`@Component`](https://angular.io/docs/ts/latest/api/core/index/Component-decorator.html) decorators: **Do** use `@Input` and `@Output` instead of the `inputs` and `outputs` properties of the
`@Directive and `@Component` decorators:
.s-rule.do .s-rule.do
:marked :marked
@ -1690,10 +1691,8 @@ a(href="#toc") Back to top
.s-why .s-why
:marked :marked
**Why?** If you ever need to rename the property or event name associated to **Why?** If you ever need to rename the property or event name associated with
[`@Input`](https://angular.io/docs/ts/latest/api/core/index/Input-var.html) or `@Input` or `@Output`, you can modify it a single place.
[`@Output`](https://angular.io/docs/ts/latest/api/core/index/Output-var.html)
you can modify it on a single place.
.s-why .s-why
:marked :marked

View File

@ -489,8 +489,8 @@ table
If we must read a target element property or call one of its methods, If we must read a target element property or call one of its methods,
we'll need a different technique. we'll need a different technique.
See the API reference for See the API reference for
[viewChild](../api/core/index/ViewChild-var.html) and [viewChild](../api/core/index/ViewChild-decorator.html) and
[contentChild](../api/core/index/ContentChild-var.html). [contentChild](../api/core/index/ContentChild-decorator.html).
:marked :marked
### Binding target ### Binding target
@ -885,7 +885,7 @@ block style-property-name-dart-diff
The `ngModel` input property sets the element's value property and the `ngModelChange` output property The `ngModel` input property sets the element's value property and the `ngModelChange` output property
listens for changes to the element's value. listens for changes to the element's value.
The details are specific to each kind of element and therefore the `NgModel` directive only works for elements, The details are specific to each kind of element and therefore the `NgModel` directive only works for elements,
such as the input text box, that are supported by a [ControlValueAccessor](../api/common/index/ControlValueAccessor-interface.html). such as the input text box, that are supported by a [ControlValueAccessor](../api/forms/index/ControlValueAccessor-interface.html).
We can't apply `[(ngModel)]` to our custom components until we write a suitable *value accessor*, We can't apply `[(ngModel)]` to our custom components until we write a suitable *value accessor*,
a technique that is beyond the scope of this chapter. a technique that is beyond the scope of this chapter.

View File

@ -1414,7 +1414,7 @@ code-example(format="").
### Create the _Routing Module_ ### Create the _Routing Module_
A router needs configuration whether it's the Angular 1 or Angular 2 or any other router. A router needs configuration whether it's the Angular 1 or Angular 2 or any other router.
The details of Angular 2 router configuration are best left to the [Routing](../router.html) documentation The details of Angular 2 router configuration are best left to the [Routing documentation](router.html)
which recommends that you create a `NgModule` dedicated to router configuration which recommends that you create a `NgModule` dedicated to router configuration
(called a _Routing Module_): (called a _Routing Module_):
@ -1448,7 +1448,7 @@ code-example(format="").
+makeExample('upgrade-phonecat-3-final/ts/app/phone-list/phone-list.template.html', 'list', 'app/phone-list/phone-list.template.html (list with links)')(format='.') +makeExample('upgrade-phonecat-3-final/ts/app/phone-list/phone-list.template.html', 'list', 'app/phone-list/phone-list.template.html (list with links)')(format='.')
.l-sub-section .l-sub-section
:marked :marked
See the [Routing](../router.html) page for details. See the [Routing](router.html) page for details.
:marked :marked
### Bootstrap as an Angular 2 app ### Bootstrap as an Angular 2 app

View File

@ -201,8 +201,8 @@ block install-packages
browser. browser.
The QuickStart application doesn't do anything else, so you don't need any other modules. In a real The QuickStart application doesn't do anything else, so you don't need any other modules. In a real
application, you'd likely import [`FormsModule`](../latest/api/forms/index/FormsModule-class application, you'd likely import [`FormsModule`](../latest/api/forms/index/FormsModule-class.html)
.html) as well as [`RouterModule`](../latest/api/router/index/RouterModule-class.html) and as well as [`RouterModule`](../latest/api/router/index/RouterModule-class.html) and
[`HttpModule`](../latest/api/http/index/HttpModule-class.html). These are introduced in the [`HttpModule`](../latest/api/http/index/HttpModule-class.html). These are introduced in the
[Tour of Heroes Tutorial](./tutorial/). [Tour of Heroes Tutorial](./tutorial/).
@ -227,8 +227,7 @@ p.
The QuickStart application has the same essential structure as any other Angular component: The QuickStart application has the same essential structure as any other Angular component:
* **An import statement**. Importing gives your component access to * **An import statement**. Importing gives your component access to
Angular's core [`@Component` decorator function](../latest/api/core/index/Component-decorator Angular's core [`@Component` decorator function](../latest/api/core/index/Component-decorator.html).
.html).
* **A @Component #{_decorator}** that associates *metadata* with the * **A @Component #{_decorator}** that associates *metadata* with the
`AppComponent` component class: `AppComponent` component class: