chore: fix broken links on 9/30, mostly API links (#2520)
This commit is contained in:
parent
9b083966f3
commit
56ac24b411
|
@ -4,7 +4,7 @@
|
|||
"rewrites": [
|
||||
{
|
||||
"source": "/docs/dart/latest/testing",
|
||||
"destination": "/docs/dart/latest/index.html"
|
||||
"destination":"/docs/dart/latest/guide/testing.html"
|
||||
},
|
||||
{
|
||||
"source": "/docs/dart/latest/tutorial",
|
||||
|
@ -12,7 +12,7 @@
|
|||
},
|
||||
{
|
||||
"source": "/docs/js/latest/testing",
|
||||
"destination": "/docs/js/latest/index.html"
|
||||
"destination": "/docs/js/latest/guide/testing.html"
|
||||
},
|
||||
{
|
||||
"source": "/docs/js/latest/tutorial",
|
||||
|
|
|
@ -1 +1 @@
|
|||
include ../../../_includes/_ts-temp
|
||||
include ../../../_includes/_ts-temp
|
||||
|
|
|
@ -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"
|
||||
}
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
include ../../../_includes/_ts-temp
|
|
@ -1 +0,0 @@
|
|||
include ../../../_includes/_ts-temp
|
|
@ -1 +0,0 @@
|
|||
include ../../../_includes/_ts-temp
|
|
@ -1 +0,0 @@
|
|||
include ../../../_includes/_ts-temp
|
|
@ -1 +0,0 @@
|
|||
include ../../../_includes/_ts-temp
|
|
@ -252,8 +252,7 @@ table(width="100%")
|
|||
for components and directives.
|
||||
|
||||
For [inputs and outputs](../guide/template-syntax.html#inputs-outputs),
|
||||
we use [`@Input`](../api/core/index/Input-var.html)
|
||||
and [`@Output`](../api/core/index/Output-var.html) property decorators.
|
||||
we use `@Input` and `@Output` property decorators.
|
||||
They may optionally specify input and output binding names if we want them to be
|
||||
different from the class property names.
|
||||
|
||||
|
@ -351,10 +350,10 @@ table(width="100%")
|
|||
|
||||
We can attach additional decorators to constructor parameters
|
||||
to qualify the injection behavior. We can mark
|
||||
optional dependencies with the [`@Optional`](../api/core/index/Optional-var.html),
|
||||
inject host element attributes with [`@Attribute`](../api/core/index/Attribute-var.html),
|
||||
inject content child queries with [`@Query`](../api/core/index/Query-var.html)
|
||||
and inject view child queries with [`@ViewQuery`](../api/core/index/ViewQuery-var.html)).
|
||||
optional dependencies with the [`@Optional`](../api/core/index/Optional-decorator.html),
|
||||
inject host element attributes with [`@Attribute`](../api/core/index/Attribute-interface.html),
|
||||
inject content child queries with [`@ContentChild`](../api/core/index/ContentChild-decorator.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="." )
|
||||
|
||||
|
@ -373,8 +372,8 @@ table(width="100%")
|
|||
|
||||
:marked
|
||||
We can apply other additional parameter decorators such as
|
||||
[`@Host`](../api/core/index/Host-var.html) and
|
||||
[`@SkipSelf`](../api/core/index/SkipSelf-var.html) in the same way -
|
||||
[`@Host`](../api/core/index/Host-decorator.html) and
|
||||
[`@SkipSelf`](../api/core/index/SkipSelf-decorator.html) in the same way -
|
||||
by adding `new ng.core.Host()` or `ng.core.SkipSelf()` in the
|
||||
parameters array.
|
||||
|
||||
|
@ -398,9 +397,9 @@ table(width="100%")
|
|||
### Host Decorators
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
+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
|
||||
a component or directive.
|
||||
|
||||
The [`@ViewChild`](../api/core/index/ViewChild-var.html) and
|
||||
[`@ViewChildren`](../api/core/index/ViewChildren-var.html) property decorators
|
||||
The [`@ViewChild`](../api/core/index/ViewChild-decorator.html) and
|
||||
[`@ViewChildren`](../api/core/index/ViewChildren-decorator.html) property decorators
|
||||
allow a component to query instances of other components that are used in
|
||||
its view.
|
||||
|
||||
+makeExample('cb-ts-to-js/ts/app/heroes-queries.component.ts', 'view')(format="." )
|
||||
|
||||
:marked
|
||||
The [`@ContentChild`](../api/core/index/ContentChild-var.html) and
|
||||
[`@ContentChildren`](../api/core/index/ContentChildren-var.html) property decorators
|
||||
The [`@ContentChild`](../api/core/index/ContentChild-decorator.html) and
|
||||
[`@ContentChildren`](../api/core/index/ContentChildren-decorator.html) property decorators
|
||||
allow a component to query instances of other components that have been projected
|
||||
into its view from elsewhere.
|
||||
|
||||
|
|
|
@ -485,7 +485,7 @@ figure.image-display
|
|||
.l-sub-section
|
||||
:marked
|
||||
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.
|
||||
We set `name` to `ngModel` because the `ngModel` directive's `exportAs` property happens to be "ngModel".
|
||||
|
||||
|
@ -497,7 +497,7 @@ figure.image-display
|
|||
:marked
|
||||
### The 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
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
include ../../../_includes/_ts-temp
|
||||
include ../../../_includes/_ts-temp
|
||||
|
|
|
@ -1 +1 @@
|
|||
include ../../../_includes/_ts-temp
|
||||
include ../../../_includes/_ts-temp
|
||||
|
|
|
@ -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"
|
||||
}
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
include ../../../_includes/_ts-temp
|
|
@ -1 +0,0 @@
|
|||
include ../../../_includes/_ts-temp
|
|
@ -1 +0,0 @@
|
|||
include ../../../_includes/_ts-temp
|
|
@ -1 +0,0 @@
|
|||
include ../../../_includes/_ts-temp
|
|
@ -1 +0,0 @@
|
|||
include ../../../_includes/_ts-temp
|
|
@ -530,12 +530,11 @@ a#N
|
|||
:marked
|
||||
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
|
||||
## Provider
|
||||
.l-sub-section
|
||||
: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.
|
||||
It relates a lookup token to code—sometimes called a "recipe"—that can create a dependency value.
|
||||
|
||||
|
|
|
@ -126,13 +126,13 @@ table
|
|||
td All but Chrome and Firefox<br>Not supported in IE9
|
||||
tr(style="vertical-align: top")
|
||||
td
|
||||
a(href="../api/common/index/DatePipe-class.html" target="_blank") Date
|
||||
a(href="../api/common/index/DatePipe-pipe.html" target="_blank") Date
|
||||
span ,
|
||||
a(href="../api/common/index/CurrencyPipe-class.html" target="_blank") currency
|
||||
a(href="../api/common/index/CurrencyPipe-pipe.html" target="_blank") currency
|
||||
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
|
||||
a(href="../api/common/index/PercentPipe-class.html" target="_blank") percent
|
||||
a(href="../api/common/index/PercentPipe-pipe.html" target="_blank") percent
|
||||
span pipes
|
||||
td
|
||||
:marked
|
||||
|
|
|
@ -502,7 +502,7 @@ figure.image-display
|
|||
.l-sub-section
|
||||
:marked
|
||||
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.
|
||||
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
|
||||
:marked
|
||||
### 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.
|
||||
|
||||
|
|
|
@ -453,7 +453,7 @@ figure.image-display
|
|||
:marked
|
||||
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
|
||||
[@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=".")
|
||||
#wait-a-tick
|
||||
|
@ -532,7 +532,7 @@ figure.image-display
|
|||
|
||||
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
|
||||
[@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=".")
|
||||
|
||||
|
|
|
@ -103,7 +103,7 @@ figure.image-display
|
|||
|
||||
.l-sub-section
|
||||
: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
|
||||
## Chaining pipes
|
||||
|
@ -403,7 +403,7 @@ figure.image-display
|
|||
.callout.is-helpful
|
||||
header Debugging with the json pipe
|
||||
: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
|
||||
inspect an object for future binding.
|
||||
|
||||
|
|
|
@ -1678,7 +1678,8 @@ a(href="#toc") Back to top
|
|||
|
||||
.s-rule.do
|
||||
: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
|
||||
:marked
|
||||
|
@ -1690,10 +1691,8 @@ a(href="#toc") Back to top
|
|||
|
||||
.s-why
|
||||
:marked
|
||||
**Why?** If you ever need to rename the property or event name associated to
|
||||
[`@Input`](https://angular.io/docs/ts/latest/api/core/index/Input-var.html) or
|
||||
[`@Output`](https://angular.io/docs/ts/latest/api/core/index/Output-var.html)
|
||||
you can modify it on a single place.
|
||||
**Why?** If you ever need to rename the property or event name associated with
|
||||
`@Input` or `@Output`, you can modify it a single place.
|
||||
|
||||
.s-why
|
||||
:marked
|
||||
|
|
|
@ -489,8 +489,8 @@ table
|
|||
If we must read a target element property or call one of its methods,
|
||||
we'll need a different technique.
|
||||
See the API reference for
|
||||
[viewChild](../api/core/index/ViewChild-var.html) and
|
||||
[contentChild](../api/core/index/ContentChild-var.html).
|
||||
[viewChild](../api/core/index/ViewChild-decorator.html) and
|
||||
[contentChild](../api/core/index/ContentChild-decorator.html).
|
||||
|
||||
:marked
|
||||
### 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
|
||||
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,
|
||||
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*,
|
||||
a technique that is beyond the scope of this chapter.
|
||||
|
||||
|
|
|
@ -1414,7 +1414,7 @@ code-example(format="").
|
|||
### Create the _Routing Module_
|
||||
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
|
||||
(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='.')
|
||||
.l-sub-section
|
||||
:marked
|
||||
See the [Routing](../router.html) page for details.
|
||||
See the [Routing](router.html) page for details.
|
||||
|
||||
:marked
|
||||
### Bootstrap as an Angular 2 app
|
||||
|
|
|
@ -201,8 +201,8 @@ block install-packages
|
|||
browser.
|
||||
|
||||
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
|
||||
.html) as well as [`RouterModule`](../latest/api/router/index/RouterModule-class.html) and
|
||||
application, you'd likely import [`FormsModule`](../latest/api/forms/index/FormsModule-class.html)
|
||||
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
|
||||
[Tour of Heroes Tutorial](./tutorial/).
|
||||
|
||||
|
@ -227,8 +227,7 @@ p.
|
|||
The QuickStart application has the same essential structure as any other Angular component:
|
||||
|
||||
* **An import statement**. Importing gives your component access to
|
||||
Angular's core [`@Component` decorator function](../latest/api/core/index/Component-decorator
|
||||
.html).
|
||||
Angular's core [`@Component` decorator function](../latest/api/core/index/Component-decorator.html).
|
||||
* **A @Component #{_decorator}** that associates *metadata* with the
|
||||
`AppComponent` component class:
|
||||
|
||||
|
|
Loading…
Reference in New Issue