This repository was archived by the owner on Dec 4, 2017. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 877
docs(structural-directives): typos and clean-up #3031
Merged
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,13 +5,13 @@ block includes | |
One of the defining features of a single page application is its manipulation | ||
of the DOM tree. Instead of serving a whole new page every time a user | ||
navigates, whole sections of the DOM appear and disappear according | ||
to the application state. In this chapter we'll to look at how Angular | ||
to the application state. In this chapter we'll look at how Angular | ||
manipulates the DOM and how we can do it ourselves in our own directives. | ||
|
||
In this chapter we will | ||
- [learn what structural directives are](#definition) | ||
- [study *ngIf*](#ngIf) | ||
- [discover the <template> element](#template) | ||
- [discover the <template> element](#template) | ||
- [understand the asterisk (\*) in **ngFor*](#asterisk) | ||
- [write our own structural directive](#unless) | ||
|
||
|
@@ -48,7 +48,7 @@ block includes | |
:marked | ||
## NgIf Case Study | ||
|
||
Let’s focus on `ngIf`. It's a great example of a structural | ||
Let's focus on `ngIf`. It's a great example of a structural | ||
directive: it takes a boolean and makes an entire chunk of DOM appear | ||
or disappear. | ||
|
||
|
@@ -72,9 +72,9 @@ figure.image-display | |
the component's behavior continues. | ||
It remains attached to its DOM element. It continues to listen to events. | ||
Angular keeps checking for changes that could affect data bindings. | ||
Whatever the component was doing it keeps doing. | ||
Whatever the component was doing, it keeps doing it. | ||
|
||
Although invisible, the component — and all of its descendent components — | ||
Although invisible, the component — and all of its descendant components — | ||
tie up resources that might be more useful elsewhere. | ||
The performance and memory burden can be substantial and the user may not benefit at all. | ||
|
||
|
@@ -143,7 +143,7 @@ figure.image-display | |
a heavy price to create and destroy it. | ||
|
||
If we really expected to "wink" the component like this, toggling visibility would be the better choice. | ||
In most UIs, when we "close" a component we're unlikely see it again for a long time, if ever. | ||
In most UIs, when we "close" a component we're unlikely to see it again for a long time, if ever. | ||
The `ngIf` would be preferred in that case. | ||
|
||
<a id="template"></a> | ||
|
@@ -209,7 +209,7 @@ figure.image-display | |
|
||
+makeExample('structural-directives/ts/app/structural-directives.component.html', 'ngFor-template')(format=".") | ||
:marked | ||
The basic pattern is the same: create a `<template>`, relocate the content, | ||
The basic pattern is the same: create a `<template>`, relocate the content, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please revert to the |
||
and move the directive onto the `<template>`. | ||
|
||
There are extra nuances stemming from | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Please revert the
<
as our jade engine is confused by angle brackets.