Better loading of todomvc
This commit is contained in:
parent
56aecc0866
commit
9040937702
|
@ -1,6 +1,10 @@
|
|||
(ns todomvc.dev
|
||||
(:require [todomvc.core :as example]
|
||||
(:require [todomvc.core :as todomvc]
|
||||
[figwheel.client :as fw]))
|
||||
|
||||
(fw/start {:on-jsload example/run
|
||||
#_(fw/start {:on-jsload todomvc/main
|
||||
:websocket-url "ws://localhost:3449/figwheel-ws"})
|
||||
|
||||
(defn start []
|
||||
(fw/start {:jsload-callback (fn [] (todomvc/main))})
|
||||
(todomvc/main))
|
|
@ -2,16 +2,19 @@
|
|||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Example</title>
|
||||
<title>Reframe Todomvc</title>
|
||||
<link rel="stylesheet" href="todos.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app">
|
||||
<h1>Reagent example app – see README.md</h1>
|
||||
<h1>Re-frame example app</h1>
|
||||
</div>
|
||||
<script src="target/client.js"></script>
|
||||
<script>
|
||||
todomvc.core.run();
|
||||
window.onload = function () {
|
||||
// Notice that "-" gets turned into "_" when in javscript-land
|
||||
todomvc.dev.start();
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Reference in New Issue