docs(structural-directives): typos and clean-up (#3031)

This commit is contained in:
Josep Sayol 2017-01-03 23:13:41 +01:00 committed by Ward Bell
parent 6d431f11ce
commit 2f28b321ee

View File

@ -5,7 +5,7 @@ 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
@ -48,7 +48,7 @@ block includes
:marked
## NgIf Case Study
Lets 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>