Skip to content

Commit 57535d9

Browse files
committed
Update to docs to support demo app beside docs app.
1 parent 3b7ae99 commit 57535d9

File tree

5 files changed

+60
-4
lines changed

5 files changed

+60
-4
lines changed

.angular-cli.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@
6565
"outDir": "dist/apps/demo",
6666
"assets": [
6767
"assets",
68-
"favicon.ico"
68+
"favicon.ico",
69+
"404.html"
6970
],
7071
"index": "index.html",
7172
"main": "main.ts",
@@ -91,7 +92,8 @@
9192
"outDir": "dist/apps/demo",
9293
"assets": [
9394
"assets",
94-
"favicon.ico"
95+
"favicon.ico",
96+
"404.html"
9597
],
9698
"index": "index.html",
9799
"main": "main.ts",

apps/demo/src/404.html

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<html lang="en">
2+
3+
<head>
4+
<meta charset="utf-8" />
5+
6+
<title>Angular-React Demo</title>
7+
8+
<script>
9+
// Store the URL the user was trying to access when receiving the 404.
10+
sessionStorage.redirect = location.href;
11+
</script>
12+
13+
<!-- Immediately redirect to the base URL so we can use the SPA routing. -->
14+
<meta http-equiv="refresh" content="0;URL='https://benfeely.github.io/angular-react/demo/'"></meta>
15+
</head>
16+
17+
<body>
18+
<!-- IE required at least 512 bytes of data to show non-default 404. -->
19+
20+
21+
22+
</body>
23+
24+
25+
</body>
26+
27+
</html>

docs/demo/404.html

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<html lang="en">
2+
3+
<head>
4+
<meta charset="utf-8" />
5+
6+
<title>Angular-React Demo</title>
7+
8+
<script>
9+
// Store the URL the user was trying to access when receiving the 404.
10+
sessionStorage.redirect = location.href;
11+
</script>
12+
13+
<!-- Immediately redirect to the base URL so we can use the SPA routing. -->
14+
<meta http-equiv="refresh" content="0;URL='https://benfeely.github.io/angular-react/demo/'"></meta>
15+
</head>
16+
17+
<body>
18+
<!-- IE required at least 512 bytes of data to show non-default 404. -->
19+
20+
21+
22+
</body>
23+
24+
25+
</body>
26+
27+
</html>

docs/demo/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<!doctype html><html lang="en"><head><meta charset="utf-8"><title>Angular-React Demo</title><base href="https://benfeely.github.io/angular-react/demo"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" type="image/x-icon" href="favicon.ico"><link href="styles.0744b9f6769c326ccd7f.bundle.css" rel="stylesheet"/></head><body><app-root></app-root><script type="text/javascript" src="inline.318b50c57b4eba3d437b.bundle.js"></script><script type="text/javascript" src="polyfills.5b3304df6308ba6429e5.bundle.js"></script><script type="text/javascript" src="main.525c06e3a53e2e95d176.bundle.js"></script></body></html>
1+
<!doctype html><html lang="en"><head><meta charset="utf-8"><title>Angular-React Demo</title><base href="https://benfeely.github.io/angular-react/demo/"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" type="image/x-icon" href="favicon.ico"><link href="styles.0744b9f6769c326ccd7f.bundle.css" rel="stylesheet"/></head><body><app-root></app-root><script type="text/javascript" src="inline.318b50c57b4eba3d437b.bundle.js"></script><script type="text/javascript" src="polyfills.5b3304df6308ba6429e5.bundle.js"></script><script type="text/javascript" src="main.525c06e3a53e2e95d176.bundle.js"></script></body></html>

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"build:demo": "ng build --app demo",
1414
"build:demo:prod": "ng build --app demo --prod",
1515
"build:demo:prod:package": "ng build --app demo-from-packages --prod",
16-
"build:demo:github": "ng build --app demo --prod --output-path docs/demo --base-href https://benfeely.github.io/angular-react/demo",
16+
"build:demo:github": "ng build --app demo --prod --output-path docs/demo --base-href https://benfeely.github.io/angular-react/demo/",
1717

1818
"build:docs": "ng build --app docs",
1919
"build:docs:prod": "ng build --app docs --prod",

0 commit comments

Comments
 (0)