-
Notifications
You must be signed in to change notification settings - Fork 875
docs(template-syntax/structural-directives): refresh both guides #3110
docs(template-syntax/structural-directives): refresh both guides #3110
Conversation
6c84ea9
to
4d72fdb
Compare
e9e48d6
to
080855a
Compare
04a374c
to
5c41ab0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
K .I hope I've answered your questions to your satisfaction.
+makeExample('structural-directives/ts/app/app.component.html', 'inside-ngfor')(format=".") | ||
|
||
:marked | ||
This is manifestly more complicated than `ngIf` and rightly so. | ||
`NgFor` directive has more features, both required and optional, than the `NgIf` shown in this guide. | ||
The `ngFor` directive has more features, both required and optional, than the `NgIf` shown in this guide. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reversing. Talking about the directive class, not the selector name. The class has features. The selector does not. HTH.
@@ -305,6 +315,14 @@ a#microsyntax | |||
The `NgFor` directive sets its _context's_ `$implicit` property to the current item in the list during each iteration. | |||
That becomes the current value of the `hero` variable in the example above. | |||
|
|||
.alert.is-critical | |||
:marked | |||
Ward: I got lost on this third point. ^^ By context, do we mean the element that the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me try again and see if it helps.
|
||
The expression could call something like `getFoo()`. Only we know what `getFoo()` does. | ||
If `getFoo()` changes something and we happen to be binding to that something, we risk an unpleasant experience. Angular may or may not display the changed value. Angular may detect the change and throw a warning error. Our general advice: stick to data properties and to methods that return values and do no more. | ||
The expression could call something like `getFoo()`. Only directive know what `getFoo()` does. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possible missing word? Maybe "the"?
"Only directive know what getFoo()
does."
The following couple of sentences use singular "directive" along with the plural of the verb in the same manner.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh my! Some kind of search and replace changed "your" or "we" to "directive". Seems to have been limited to this location. Fixed it.
@@ -541,7 +601,7 @@ block dart-type-exceptions | |||
:marked | |||
### Remember the brackets | |||
The brackets tell Angular to evaluate the template expression. | |||
If we forget the brackets, Angular treats the string as a constant and *initializes the target property* with that string. | |||
If directive forget the brackets, Angular treats the string as a constant and *initializes the target property* with that string. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"If the directive doesn't have the brackets" or something similar that fixes "directive forget"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about "if you omit the brackets"
I thought I fixed all the "we" to "you". Hmmm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that was the first of a rogue find and replace that sprinkled "directive" in places "you" or "we" seems to have been. I think I changed all the rest of them. I just went back and changed this one and pushed up.
69e9428
to
bdaf663
Compare
1f0ad42
to
7643eca
Compare
…style, accuracy, understanding Move details of structural directives from template-syntax to structural-directives guide Add <ng-container> to structural-directives Fix samples in both guides Touch up glossary Better conformance to google doc guidelines: we->you closes angular#2303, angular#2885
7643eca
to
c70c894
Compare
…style, accuracy, understanding (angular#3110) Move details of structural directives from template-syntax to structural-directives guide Add <ng-container> to structural-directives Fix samples in both guides Touch up glossary Better conformance to google doc guidelines: we->you closes angular#2303, angular#2885
Refresh both guides for style, accuracy, understanding
Move details of structural directives from template-syntax to structural-directives guide
Add
<ng-container>
to structural-directivesFix samples in both guides
Touch up glossary
Better conformance to google doc guidelines: we->you
closes #2303, #2885
Todo