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

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

Merged
merged 2 commits into from
Jan 3, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions public/docs/ts/latest/guide/structural-directives.jade
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert the &lt; as our jade engine is confused by angle brackets.

- [understand the asterisk (\*) in **ngFor*](#asterisk)
- [write our own structural directive](#unless)

Expand Down Expand Up @@ -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.

Expand All @@ -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 &mdash; and all of its descendent components &mdash;
Although invisible, the component &mdash; and all of its descendant components &mdash;
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.

Expand Down Expand Up @@ -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>
Expand Down Expand Up @@ -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:&nbsp; create a `<template>`, relocate the content,
The basic pattern is the same: create a `<template>`, relocate the content,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert to the &nbsp;. I wanted that extra spacing.

and move the directive onto the `<template>`.

There are extra nuances stemming from
Expand Down