@@ -2659,26 +2659,25 @@ a#final-app
2659
2659
:marked
2660
2660
Parse it out.
2661
2661
2662
- * The first item in the array identifies the parent route (' /crisis-center' ).
2662
+ * The first item in the array identifies the parent route (` /crisis-center` ).
2663
2663
* There are no parameters for this parent route so you're done with it.
2664
2664
* There is no default for the child route so you need to pick one.
2665
- * You're navigating to the `CrisisListComponent`, whose route path is '/' , but you don't need to explicitly add the slash
2665
+ * You're navigating to the `CrisisListComponent`, whose route path is `/` , but you don't need to explicitly add the slash
2666
2666
* Voila! `['/crisis-center']`.
2667
2667
2668
- Take it a step further.
2669
- This time you'll build a link parameters array that navigates from the root of the application
2670
- down to the "Dragon Crisis".
2671
-
2672
- * The first item in the array identifies the parent route ('/crisis-center').
2673
- * There are no parameters for this parent route so you're done with it.
2674
- * The second item identifies the child route for details about a particular crisis ('/:id').
2675
- * The details child route requires an `id` route parameter
2676
- * You added the `id` of the *Dragon Crisis* as the second item in the array (`1`)
2677
-
2678
- It looks like this!
2668
+ Take it a step further. Consider the following router link that
2669
+ navigates from the root of the application down to the *Dragon Crisis*:
2679
2670
2680
2671
+ makeExcerpt('app/app.component.3.ts' , 'Dragon-anchor' , '' )
2681
2672
2673
+ :marked
2674
+ * The first item in the array identifies the parent route (`/crisis-center`).
2675
+ * There are no parameters for this parent route so you're done with it.
2676
+ * The second item identifies the child route details about a particular crisis (`/:id`).
2677
+ * The details child route requires an `id` route parameter.
2678
+ * You added the `id` of the *Dragon Crisis* as the second item in the array (`1`).
2679
+ * The resulting path is `/crisis-center/1`.
2680
+
2682
2681
:marked
2683
2682
If you wanted to, you could redefine the `AppComponent` template with *Crisis Center* routes exclusively:
2684
2683
@@ -2707,7 +2706,7 @@ a#browser-url-styles
2707
2706
2708
2707
Here's the *Crisis Center* URL in this "HTML 5 pushState" style:
2709
2708
2710
- code-example( format ="." , language = "bash ") .
2709
+ code-example( format ="nocode " ) .
2711
2710
localhost:3002/crisis-center/
2712
2711
2713
2712
:marked
@@ -2716,7 +2715,7 @@ code-example(format=".", language="bash").
2716
2715
Routers can take advantage of this exception by composing in-application route
2717
2716
URLs with hashes. Here's a "hash URL" that routes to the *Crisis Center*
2718
2717
2719
- code-example( format ="." , language = "bash ") .
2718
+ code-example( format ="nocode " ) .
2720
2719
localhost:3002/src/#/crisis-center/
2721
2720
2722
2721
:marked
@@ -2780,13 +2779,10 @@ code-example(format=".", language="bash").
2780
2779
2781
2780
Those developers may still use HTML 5 URLs by taking two remedial steps:
2782
2781
2783
- 1. Provide the router with an appropriate ` APP_BASE_HREF` value.
2782
+ 1. Provide the router with an appropriate [ APP_BASE_HREF][] value.
2784
2783
1. Use _root URLs_ for all web resources: css, images, scripts, and template html files.
2785
2784
2786
- .l-sub-section
2787
- :marked
2788
- Learn about the [APP_BASE_HREF](../api/common/index/APP_BASE_HREF-let.html)
2789
- in the API Guide.
2785
+ [APP_BASE_HREF]: ../api/common/index/APP_BASE_HREF-let.html
2790
2786
2791
2787
:marked
2792
2788
### *HashLocationStrategy*
0 commit comments