Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.

Commit d474c9a

Browse files
wardbellnaomiblack
authored andcommitted
stumped by the router wildcard
1 parent 0c1d7ca commit d474c9a

File tree

6 files changed

+1514
-2
lines changed

6 files changed

+1514
-2
lines changed

public/docs/_examples/router/ts/app/app.component.ts

+7-2
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,23 @@ import {HeroDetailComponent} from './heroes/hero-detail.component';
2222
// #docregion route-config
2323
@RouteConfig([
2424

25+
/*
2526
// #docregion route-config-cc
2627
{ // Crisis Center child route
2728
path: '/crisis-center/...',
2829
name: 'CrisisCenter',
2930
component: CrisisCenterComponent,
3031
useAsDefault: true
3132
},
32-
// #enddocregion route-config-cc
3333
34+
// #enddocregion route-config-cc
35+
*/
36+
{path: '/crisis-center/...', name: 'CrisisCenter', component: CrisisCenterComponent, useAsDefault: true},
3437
{path: '/heroes', name: 'Heroes', component: HeroListComponent},
3538
{path: '/hero/:id', name: 'HeroDetail', component: HeroDetailComponent},
36-
{path: '/*other', redirectTo: ['Heroes']},
39+
// #docregion other
40+
{path: '/*other', redirectTo: ['CrisisCenter']},
41+
// #enddocregion other
3742
])
3843
// #enddocregion route-config
3944
export class AppComponent { }
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
2+
3+
<!DOCTYPE html>
4+
<html>
5+
<head>
6+
<title></title>
7+
<style>
8+
body {
9+
max-width: 1000px;
10+
}
11+
h2 {
12+
margin-top: 20px;
13+
margin-bottom: 0;
14+
border-bottom: solid 1px black;
15+
}
16+
h3 {
17+
margin-top: 10px;
18+
margin-bottom: 0;
19+
padding-left: 20px;
20+
}
21+
h4 {
22+
padding-left: 30px;
23+
margin: 0;
24+
}
25+
.not-documented::after {
26+
content: "(not documented)";
27+
font-size: small;
28+
font-style: italic;
29+
color: red;
30+
}
31+
a {
32+
color: black;
33+
text-decoration: none;
34+
}
35+
</style>
36+
</head>
37+
<body>
38+
39+
40+
<h1>Module Overview</h1>
41+
42+
43+
44+
</body>
45+
</html>

0 commit comments

Comments
 (0)