Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.

docs(template-syntax): code fixes and copyedits #3365

Merged

Conversation

chalin
Copy link
Contributor

@chalin chalin commented Mar 9, 2017

  • 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.

Copy link
Contributor

@wardbell wardbell left a 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">
Copy link
Contributor

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).

Copy link
Contributor Author

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++);
Copy link
Contributor

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.

Copy link
Contributor Author

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.
Copy link
Contributor

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](#...)

Copy link
Contributor Author

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
Copy link
Contributor

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

Copy link
Contributor Author

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.
@chalin chalin force-pushed the chalin-template-syntax-copyedits-0306 branch from 5d2e829 to 4bf1d66 Compare March 9, 2017 18:43
@wardbell wardbell merged commit a8ad96e into angular:master Mar 9, 2017
@wardbell wardbell deleted the chalin-template-syntax-copyedits-0306 branch March 9, 2017 20:13
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants