minor grammar fixes

This commit is contained in:
John Papa 2015-10-15 22:32:47 -04:00
parent 4bea418356
commit 1a5f9f36ec
1 changed files with 3 additions and 3 deletions

View File

@ -273,14 +273,14 @@ include ../../../../_includes/_util-fns
When our app loads we see a list of heroes, but a hero is not selected.
The `selectedHero` is `undefined`.
Thats why we'll' see the following error in the browsers console:
Thats why we'll see the following error in the browsers console:
```
EXCEPTION: TypeError: Cannot read property 'name' of undefined in [null]
```
Remember that we are displaying `selectedHero.name` in the template.
This name property does not exist because `selectedHero`itself is undefined.
We'll' address this problem by keeping the hero detail out of the DOM until there is a selected hero.
We'll address this problem by keeping the hero detail out of the DOM until there is a selected hero.
We wrap the HTML hero detail content of our template with a `<div>`.
Then we add the `ng-if` built-in directive and set it to the `selectedHero` property of our component.
@ -374,7 +374,7 @@ include ../../../../_includes/_util-fns
:markdown
Notice in the template that the `ng-class` name is surrounded in square brackets (`[]`).
This is the syntax for a Property Binding, a binding in which data flow one way
This is the syntax for a Property Binding, a binding in which data flows one way
from the data source (the `getSelectedClass`) to a property of the `ng-class` directive.
.alert.is-helpful