-
Notifications
You must be signed in to change notification settings - Fork 875
docs(template-syntax): code fixes and copyedits #3365
docs(template-syntax): code fixes and copyedits #3365
Conversation
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 left a very few comments/questions, none of them showstoppers ...
...except the one about <ng-content>
which is either correct or a mistake. Please confirm for my peace of mind.
Then we merge!
</p> | ||
<p>Pick your favorite hero</p> | ||
<div> | ||
<label *ngFor="let h of heroes"> |
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 am fine with this as long as the text is not about <ng-container>
. Can you confirm that it is not (I don't have time to look right now).
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.
It is not. Like for the structural directives page, this is just support code -- i.e., it is not featured on the page.
@@ -31,8 +31,8 @@ export class AppComponent implements AfterViewInit, OnInit { | |||
|
|||
ngAfterViewInit() { | |||
// Detect effects of NgForTrackBy | |||
trackChanges(this.heroesNoTrackBy, () => this.heroesNoTrackByCount += 1); | |||
trackChanges(this.heroesWithTrackBy, () => this.heroesWithTrackByCount += 1); | |||
trackChanges(this.heroesNoTrackBy, () => this.heroesNoTrackByCount++); |
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.
Crockford will be very unhappy with you. He disapproves of ++
and prefers +=
.
At the time I wrote this, I'm not sure that ++
was allowed.
All FYI. No need to revert.
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
it assigns this composite interpolated result to an **element or directive property**. | ||
|
||
You appear to be inserting the result between element tags and assigning it to attributes. | ||
It's convenient to think so, and you rarely suffer for this mistake. | ||
Though this is not exactly true. Interpolation is a special syntax that Angular converts into a | ||
[property binding](#property-binding), and is explained below. | ||
[property binding](#property-binding), as is explained below. |
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.
as explained below
Can you add a link to where to find that explanation? as explained [below](#...)
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.
done
[template statement](#template-statements) on the right. | ||
The following event binding listens for the button's click event, calling | ||
The following event binding listens for the button's click events, calling |
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.
Why plural "events"? I'm talking about the "click event", not the stream of events passed to the click event handler. May I should have written
for the button's
click
event
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 added the plural form because one listens for events on a stream.)
- onSave "no propagation" case _was_ propagating. Fixed. - `firstName` --> `name` (a few were missed during a previous edit). - Hercules had a _rate_ of 325, not an id; fixed so it matches figure. - Missing closing `</div>` in form HTML - Prose: fix json representation of Hercules (since Hero class has changed). - Added missing AppComponent properties used in template but not declared in class; which will likely result in errors when compiled with AOT. - Some "back to top" were not formatted properly after a figure. - Copyedits, e.g., Angular modules such the --> such as the - Removed Jade blocks no longer used by Dart.
5d2e829
to
4bf1d66
Compare
firstName
-->name
(a few were missed during a previous edit).</div>
in form HTML