Fix typos in Forms & DI chapters; add links in testing docs
closes #398
This commit is contained in:
parent
0ddd70a6e1
commit
4b4582cb17
|
@ -21,7 +21,7 @@ html(lang="en" ng-app="angularIOApp" itemscope itemtype="http://schema.org/Frame
|
|||
article(class="l-content-small grid-fluid docs-content")
|
||||
!= yield
|
||||
|
||||
if current.path[3] == 'guide' && current.path[4]
|
||||
if (current.path[3] == 'guide' || current.path[3] == 'testing') && current.path[4]
|
||||
!= partial("../_includes/_next-item")
|
||||
|
||||
!= partial("../_includes/_footer")
|
||||
|
|
|
@ -300,7 +300,7 @@ include ../../../../_includes/_util-fns
|
|||
We emphasized earlier that designing a class for dependency injection makes it easier to test.
|
||||
|
||||
Mission accomplished! We don't even need the Angular Dependency Injection system to test the `HeroesComponent`.
|
||||
We simply create a bew `HeroesComponent` with a mock service and poke at it:
|
||||
We simply create a new `HeroesComponent` with a mock service and poke at it:
|
||||
```
|
||||
it("should have heroes when created", () => {
|
||||
let hc = new HeroesComponent(mockService);
|
||||
|
|
|
@ -172,7 +172,7 @@ figure.image-display
|
|||
|
||||
1. The `template` is simply the new element tag identified by the component's `select` property.
|
||||
|
||||
1. The `directives` array tells Angular that our templated depends upon the `HeroFormComponent`
|
||||
1. The `directives` array tells Angular that our template depends upon the `HeroFormComponent`
|
||||
which is itself a Directive (as are all Components).
|
||||
|
||||
.l-main-section
|
||||
|
|
|
@ -128,7 +128,7 @@ figure.image-display
|
|||
+makeExample('pipes/ts/src/app/exponential-strength-pipe.ts')
|
||||
|
||||
:marked
|
||||
This pipe definition reveals several few key points
|
||||
This pipe definition reveals several key points
|
||||
* We import the `Pipe` decorator from the Angular library (while getting the usual symbols)
|
||||
* A pipe is a class
|
||||
* We decorate the class with the `@Pipe` decorator function.
|
||||
|
|
Loading…
Reference in New Issue