docs: make structural directives guide generic (#44895)

tweak the current structural directives guide (currently mainly targeted
at the creation of custom structural directives) so that is more generic
and a point of reference for structural directives in general

this also includes the re-addition of the one-per-element section
removed in PR #40015

resolves #44786

PR Close #44895
This commit is contained in:
dario-piotrowicz
2022-01-29 21:16:24 +00:00
committed by Alex Rickabaugh
parent 30427135ce
commit c8086b7e86
9 changed files with 111 additions and 101 deletions
+2 -2
View File
@@ -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/built-in-directives#one-per-element).
* on an element](guide/structural-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/built-in-directives#one-per-element).
* [Structural Directives](guide/structural-directives#one-per-element).
*
* @usageNotes
*
+1 -1
View File
@@ -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/built-in-directives#one-per-element).
* [Structural Directives](guide/structural-directives#one-per-element).
*
* @ngModule CommonModule
* @publicApi