Better loading of todomvc

This commit is contained in:
mike-thompson-day8 2015-03-02 07:56:47 +11:00
parent 56aecc0866
commit 9040937702
2 changed files with 12 additions and 5 deletions

View File

@ -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))

View File

@ -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>