Commit 9bf270081d898c0ec622f792b7f8e6e340f7a102
app/html/app should return an html element
Dominic Tarr committed on 8/16/2017, 4:56:17 AMParent: 7458998a2a59e0edaf11b6ce83867a72f96577d6
Files changed
app/html/app.js | changed |
main.js | changed |
app/html/app.js | ||
---|---|---|
@@ -15,11 +15,8 @@ | ||
15 | 15 | }) |
16 | 16 | |
17 | 17 | exports.needs = nest({ |
18 | 18 | 'app.async.catchLinkClick': 'first', |
19 | -// 'history.sync.push': 'first', | |
20 | -// 'history.obs.location': 'first', | |
21 | -// 'history.obs.store': 'first', | |
22 | 19 | 'router.sync.router': 'first', |
23 | 20 | 'styles.css': 'first' |
24 | 21 | }) |
25 | 22 | |
@@ -46,12 +43,14 @@ | ||
46 | 43 | if (isExternal) return openExternal(link) |
47 | 44 | nav.push(link) |
48 | 45 | }) |
49 | 46 | nav.push({page: 'home'}) |
50 | - document.body.appendChild(nav) | |
47 | + return nav | |
51 | 48 | }, |
52 | 49 | 'history.sync.push': (location) => nav.push(location), |
53 | 50 | 'history.sync.back': () => nav.back(), |
54 | 51 | 'history.obs.location': () => nav.history, |
55 | 52 | }) |
56 | 53 | } |
57 | 54 | |
55 | + | |
56 | + |
main.js | ||
---|---|---|
@@ -28,13 +28,10 @@ | ||
28 | 28 | ) |
29 | 29 | |
30 | 30 | const api = entry(sockets, nest('app.html.app', 'first')) |
31 | 31 | |
32 | -const app = api.app.html.app() | |
32 | +document.body.appendChild(api.app.html.app()) | |
33 | 33 | |
34 | -// TODO (mix) : once app has swapping pages, attach the app to the page here | |
35 | -// document.body.appendChild(app) | |
36 | 34 | |
37 | 35 | |
38 | 36 | |
39 | 37 | |
40 | - |
Built with git-ssb-web