mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
committed by
Zach Arend
parent
356d9a0537
commit
6c783c7fcb
@@ -38,7 +38,7 @@ export class NgForOfContext<T, U extends NgIterable<T> = NgIterable<T>> {
|
||||
* of the cloned templates.
|
||||
*
|
||||
* The `ngForOf` directive is generally used in the
|
||||
* [shorthand form](guide/structural-directives#the-asterisk--prefix) `*ngFor`.
|
||||
* [shorthand form](guide/structural-directives#asterisk) `*ngFor`.
|
||||
* In this form, the template to be rendered for each iteration is the content
|
||||
* of an anchor element containing the directive.
|
||||
*
|
||||
@@ -67,11 +67,11 @@ export class NgForOfContext<T, U extends NgIterable<T> = NgIterable<T>> {
|
||||
* context according to its lexical position.
|
||||
*
|
||||
* When using the shorthand syntax, Angular allows only [one structural directive
|
||||
* on an element](guide/structural-directives#one-structural-directive-per-host-element).
|
||||
* on an element](guide/built-in-directives#one-per-element).
|
||||
* If you want to iterate conditionally, for example,
|
||||
* put the `*ngIf` on a container element that wraps the `*ngFor` element.
|
||||
* For futher discussion, see
|
||||
* [Structural Directives](guide/structural-directives#one-per-element).
|
||||
* [Structural Directives](guide/built-in-directives#one-per-element).
|
||||
*
|
||||
* @usageNotes
|
||||
*
|
||||
@@ -133,7 +133,7 @@ export class NgForOfContext<T, U extends NgIterable<T> = NgIterable<T>> {
|
||||
export class NgForOf<T, U extends NgIterable<T> = NgIterable<T>> implements DoCheck {
|
||||
/**
|
||||
* The value of the iterable expression, which can be used as a
|
||||
* [template input variable](guide/structural-directives#template-input-variable).
|
||||
* [template input variable](guide/structural-directives#shorthand).
|
||||
*/
|
||||
@Input()
|
||||
set ngForOf(ngForOf: U&NgIterable<T>|undefined|null) {
|
||||
|
||||
@@ -17,7 +17,7 @@ import {Directive, EmbeddedViewRef, Input, TemplateRef, ViewContainerRef, ɵstri
|
||||
* Angular renders the template provided in an optional `else` clause. The default
|
||||
* template for the `else` clause is blank.
|
||||
*
|
||||
* A [shorthand form](guide/structural-directives#the-asterisk--prefix) of the directive,
|
||||
* A [shorthand form](guide/structural-directives#asterisk) of the directive,
|
||||
* `*ngIf="condition"`, is generally used, provided
|
||||
* as an attribute of the anchor element for the inserted template.
|
||||
* Angular expands this into a more explicit version, in which the anchor element
|
||||
@@ -143,7 +143,7 @@ import {Directive, EmbeddedViewRef, Input, TemplateRef, ViewContainerRef, ɵstri
|
||||
*
|
||||
* The presence of the implicit template object has implications for the nesting of
|
||||
* structural directives. For more on this subject, see
|
||||
* [Structural Directives](https://angular.io/guide/structural-directives#one-per-element).
|
||||
* [Structural Directives](https://angular.io/guide/built-in-directives#one-per-element).
|
||||
*
|
||||
* @ngModule CommonModule
|
||||
* @publicApi
|
||||
|
||||
Reference in New Issue
Block a user