@@ -33,7 +33,7 @@ Here is a table of the main concepts used in the Component Router.
33
33
34
34
## Component-based Applications
35
35
36
- It recommended to develop AngularJS applications as a hierarchy of Components. Each Component
36
+ It is recommended to develop AngularJS applications as a hierarchy of Components. Each Component
37
37
is an isolated part of the application, which is responsible for its own user interface and has
38
38
a well defined programmatic interface to the Component that contains it. Take a look at the
39
39
{@link guide/component component guide} for more information.
@@ -124,7 +124,7 @@ This process continues until we run out of **Routing Components** or consume the
124
124
125
125

126
126
127
- In the previous diagram can see that the URL `/heros/4` has been matched against the `App`, `Heroes` and
127
+ In the previous diagram, we can see that the URL `/heros/4` has been matched against the `App`, `Heroes` and
128
128
`HeroDetail` **Routing Components**. The **Routers** for each of the **Routing Components** consumed a part
129
129
of the URL: "/", "/heroes" and "/4" respectively.
130
130
@@ -462,7 +462,7 @@ to display list and detail views of Heroes and Crises.
462
462
463
463
## Install the libraries
464
464
465
- It is simplest to use npm to install the **Component Router** module. For this guide we will also install
465
+ It is easier to use npm to install the **Component Router** module. For this guide we will also install
466
466
AngularJS itself via npm:
467
467
468
468
```bash
@@ -485,7 +485,7 @@ Just like any Angular application, we load the JavaScript files into our `index.
485
485
486
486
## Create the `app` module
487
487
488
- In the app.js file, create the main application module `app` which depends upon the `ngComponentRouter`
488
+ In the app.js file, create the main application module `app` which depends on the `ngComponentRouter`
489
489
module, which is provided by the **Component Router** script.
490
490
491
491
```js
@@ -494,10 +494,10 @@ angular.module('app', ['ngComponentRouter'])
494
494
495
495
We must choose what **Location Mode** the **Router** should use. We are going to use HTML5 mode locations,
496
496
so that we will not have hash-based paths. We must rely on the browser to provide `pushState` support,
497
- which is true of most modern browsers. See {@link $locationProvider#html5Mode} for more information.
497
+ which is true for most modern browsers. See {@link $locationProvider#html5Mode} for more information.
498
498
499
499
<div class="alert alert-info">
500
- Using HTML5 mode means that we can have clean URLs for our application routes but it does require that our
500
+ Using HTML5 mode means that we can have clean URLs for our application routes. However, HTML5 mode does require that our
501
501
web server, which hosts the application, understands that it must respond with the index.html file for
502
502
requests to URLs that represent all our application routes. We are going to use the `lite-server` web server
503
503
to do this for us.
@@ -550,7 +550,7 @@ Bootstrap the Angular application and add the top level App Component.
550
550
551
551
# Implementing the AppComponent
552
552
553
- In the previous section we created a single top level **App Component**. Let's now create some more
553
+ In the previous section we have created a single top level **App Component**. Let's now create some more
554
554
**Routing Components** and wire up **Route Config** for those. We start with a Heroes Feature, which
555
555
will display one of two views.
556
556
@@ -590,7 +590,7 @@ of this view will be rendered.
590
590
### ngLink
591
591
592
592
We have used the `ng-link` directive to create a link to navigate to the Heroes Component. By using this
593
- directive we don't need to know what the actual URL will be. We can leave the Router to generate that for us.
593
+ directive we don't need to know what the actual URL will be. We can let the Router generate that for us.
594
594
595
595
We have included a link to the Crisis Center but have not included the `ng-link` directive as we have not yet
596
596
implemented the CrisisCenter component.
@@ -765,7 +765,7 @@ function HeroListComponent(heroService) {
765
765
Running the application should update the browser's location to `/heroes` and display the list of heroes
766
766
returned from the `heroService`.
767
767
768
- By returning a promise for the list of heroes from `$routerOnActivate()` we can delay activation of the
768
+ By returning a promise for the list of heroes from `$routerOnActivate()` we can delay the activation of the
769
769
Route until the heroes have arrived successfully. This is similar to how a `resolve` works in {@link ngRoute}.
770
770
771
771
0 commit comments