@@ -199,16 +199,16 @@ Voilà! The resulting output should look the same, but let's see what we have ga
199
199
# Testing
200
200
201
201
Although we have combined our controller with a template into a component, we still can (and should)
202
- unit test the controller separately, since this is where are application logic and data reside.
202
+ unit test the controller separately, since this is where our application logic and data reside.
203
203
204
204
In order to retrieve and instantiate a component's controller, Angular provides the
205
205
{@link ngMock.$componentController $componentController} service.
206
206
207
207
<div class="alert alert-info">
208
- The `$controller` service that we used in the previous step, can only instantiate controllers that
209
- where registered by name, using the `.controller()` method. We could have registered our component
210
- controller this way too, if we wanted to. Instead, we chose to define it inline — inside the
211
- CDO — to keep things localized, but either way works equally well.
208
+ The `$controller` service that we used in the previous step can only instantiate controllers that
209
+ were registered by name, using the `.controller()` method. We could have registered our component
210
+ controller this way, too, if we wanted to. Instead, we chose to define it inline — inside
211
+ the CDO — to keep things localized, but either way works equally well.
212
212
</div>
213
213
214
214
<br />
@@ -268,7 +268,7 @@ Same as before, execute `npm test` to run the tests and then watch the files for
268
268
269
269
# Summary
270
270
271
- You have learned how to organize your application and presentation logic into isolated reusable
271
+ You have learned how to organize your application and presentation logic into isolated, reusable
272
272
components. Let's go to {@link step_04 step 4} to learn how to organize our code in directories and
273
273
files, so it remains easy to locate as our application grows.
274
274
0 commit comments