diff --git a/public/docs/_examples/router/ts/app/app.component.2.ts b/public/docs/_examples/router/ts/app/app.component.2.ts
index fa3dfd11cf..ffd4d8dfae 100644
--- a/public/docs/_examples/router/ts/app/app.component.2.ts
+++ b/public/docs/_examples/router/ts/app/app.component.2.ts
@@ -1,6 +1,4 @@
/* Second Heroes version */
-// #docplaster
-
// #docregion
import { Component } from '@angular/core';
diff --git a/public/docs/ts/latest/guide/router.jade b/public/docs/ts/latest/guide/router.jade
index d258167d55..2ffa94f1b3 100644
--- a/public/docs/ts/latest/guide/router.jade
+++ b/public/docs/ts/latest/guide/router.jade
@@ -19,7 +19,7 @@ include ../../../_includes/_see-addr-bar
* Click the browser's back and forward buttons and the browser navigates
backward and forward through the history of pages you've seen.
- The Angular *`Router` ("the router") borrows from this model.
+ The Angular `Router` ("the router") borrows from this model.
It can interpret a browser URL as an instruction to navigate to a client-generated view.
It can pass optional parameters along to the supporting view component that help it decide what specific content to present.
You can bind the router to links on a page and it will navigate to
@@ -32,35 +32,35 @@ include ../../../_includes/_see-addr-bar
* Setting the [base href](#base-href)
* Importing from the [router library](#import)
- * [configuring the router](#route-config)
- * handling unmatched URLs with a [wildcard route](#wildcard-route)
- * the [link parameters array](#link-parameters-array) that propels router navigation
- * setting the [default route](#default-route) where the application navigates at launch
- * [redirecting](#redirect) from one route to another
- * navigating when the user clicks a data-bound [RouterLink](#router-link)
- * navigating under [program control](#navigate)
- * retrieving information from the [route](#activated-route)
- * [animating](#route-animation) transitions for route components
- * navigating [relative](#relative-navigation) to the current URL
- * toggling css classes for the [active router link](#router-link-active)
- * embedding critical information in the URL with [route parameters](#route-parameters)
- * providing non-critical information in [optional route parameters](#optional-route-parameters)
- * refactoring routing into a [routing module](#routing-module)
- * add [child routes](#child-routing-component) under a feature section
- * [grouping child routes](#component-less-route) without a component
- * displaying [multiple routes](#named-outlets) in separate outlets
- * confirming or canceling navigation with [guards](#guards)
+ * [Configuring the router](#route-config)
+ * Handling unmatched URLs with a [wildcard route](#wildcard-route)
+ * The [link parameters array](#link-parameters-array) that propels router navigation
+ * Setting the [default route](#default-route) where the application navigates at launch
+ * [Redirecting](#redirect) from one route to another
+ * Navigating when the user clicks a data-bound [RouterLink](#router-link)
+ * Navigating under [program control](#navigate)
+ * Retrieving information from the [route](#activated-route)
+ * [Animating](#route-animation) transitions for route components
+ * Navigating [relative](#relative-navigation) to the current URL
+ * Toggling css classes for the [active router link](#router-link-active)
+ * Embedding critical information in the URL with [route parameters](#route-parameters)
+ * Providing non-critical information in [optional route parameters](#optional-route-parameters)
+ * Refactoring routing into a [routing module](#routing-module)
+ * Add [child routes](#child-routing-component) under a feature section
+ * [Grouping child routes](#component-less-route) without a component
+ * Displaying [multiple routes](#named-outlets) in separate outlets
+ * Confirming or canceling navigation with [guards](#guards)
* [CanActivate](#can-activate-guard) to prevent navigation to a route
* [CanActivateChild](#can-activate-child-guard) to prevent navigation to a child route
* [CanDeactivate](#can-deactivate-guard) to prevent navigation away from the current route
* [Resolve](#resolve-guard) to pre-fetch data before activating a route
* [CanLoad](#can-load-guard) to prevent asynchronous routing
- * providing optional information across routes with [query parameters](#query-parameters)
- * jumping to anchor elements using a [fragment](#fragment)
- * loading feature areas [asynchronously](#asynchronous-routing)
- * preloading feature areas [during navigation](#preloading)
- * using a [custom strategy](#custom-preloading) to only preload certain features
- * choosing the "HTML5" or "hash" [URL style](#browser-url-styles)
+ * Providing optional information across routes with [query parameters](#query-parameters)
+ * Jumping to anchor elements using a [fragment](#fragment)
+ * Loading feature areas [asynchronously](#asynchronous-routing)
+ * Preloading feature areas [during navigation](#preloading)
+ * Using a [custom strategy](#custom-preloading) to only preload certain features
+ * Choosing the "HTML5" or "hash" [URL style](#browser-url-styles)
.l-main-section
:marked
@@ -69,10 +69,11 @@ include ../../../_includes/_see-addr-bar
This guide proceeds in phases, marked by milestones, starting from a simple two-pager
and building toward a modular, multi-view design with child routes.
- An introduction to a few core Router concepts will help orient you to the details that follow.
+ An introduction to a few core router concepts will help orient you to the details that follow.
:marked
### *<base href>*
+
Most routing applications should add a `
routerLink
directive
- that is bound to a string or a Link Parameters Array triggers a navigation.
+ that is bound to a string or a link parameters array triggers a navigation.
tr
td RouterLinkActive
td.
@@ -235,17 +243,16 @@ table
The current state of the router including a tree of the currently activated
routes together with convenience methods for traversing the route tree.
tr
- td Link Parameters Array
+ td Link Parameters Array
td.
An array that the router interprets as a routing instruction.
You can bind that array to a RouterLink
or pass the array as an argument to
the Router.navigate
method.
tr
- td Routing Component
+ td Routing Component
td.
An Angular component with a RouterOutlet
that displays views based on router navigations.
-a#getting-started
.l-main-section
:marked
## The Sample Application
@@ -302,8 +309,10 @@ figure.image-display
Angular app navigation updates the browser history as normal web navigation does.
Now click the *Crisis Center* link for a list of ongoing crises.
+
figure.image-display
img(src='/resources/images/devguide/router/crisis-center-list.png' alt="Crisis Center List" width="250")
+
:marked
Select a crisis and the application takes you to a crisis editing screen.
The _Crisis Detail_ appears in a child view on the same page, beneath the list.
@@ -313,6 +322,7 @@ figure.image-display
figure.image-display
img(src='/resources/images/devguide/router/crisis-center-detail.png' alt="Crisis Center Detail" width="250")
+
:marked
Unlike *Hero Detail*, which updates as you type,
*Crisis Detail* changes are temporary until you either save or discard them by pressing the "Save" or "Cancel" buttons.
@@ -322,6 +332,7 @@ figure.image-display
Click the browser back button or the "Heroes" link instead.
Up pops a dialog box.
+
figure.image-display
img(src='/resources/images/devguide/router/confirm-dialog.png' alt="Confirm Dialog" width="250")
@@ -336,18 +347,19 @@ figure.image-display
Proceed to the first application milestone.
-.l-main-section
+.l-main-section#getting-started
:marked
## Milestone #1: Getting Started with the Router
Begin with a simple version of the app that navigates between two empty views.
figure.image-display
- img(src='/resources/images/devguide/router/router-1-anim.gif' width="250px" alt="App in action" )
+ img(src='/resources/images/devguide/router/router-1-anim.gif' alt="App in action" width="250")
a#base-href
:marked
### Set the *<base href>*
- The Router uses the browser's
+
+ The router uses the browser's
[history.pushState](https://developer.mozilla.org/en-US/docs/Web/API/History_API#Adding_and_modifying_history_entries)
for navigation. Thanks to `pushState`, you can make in-app URL paths look the way you want them to
look, e.g. `localhost:3000/crisis-center`. The in-app URLs can be indistinguishable from server URLs.
@@ -373,14 +385,15 @@ a#base-href
+makeExcerpt('index.html', 'base-href')
-:marked
-.l-sub-section
+.callout.is-important
+ header Live example note
:marked
- #### Live example note
A live coding environment like Plunker sets the application base address dynamically so you can't specify a fixed address.
That's why the example code replaces the `