   (connected-signal))
 
 (defonce initialize
-  (.addEventListener js/document.body "figwheel.repl.connected"
-                     on-connect))
+  (do
+    (.addEventListener js/document.body "figwheel.repl.connected"
+                       on-connect)
+    (.addEventListener js/document.body "figwheel.repl.disconnected"
+                       on-disconnect)))
 
 
 ))


(defn connected-signal []
  (add-class (gdom/getElement "connect-status") "connected"))

;; TODO memoize this into an atom
;; could probably meoize all the pages into an atom

        <section id=\"main-content\">
        %s
        </section>
      </div>
    %s
    </div> <!-- end of app div -->
    <script type=\"text/javascript\">%s</script>
  </body>
</html>"
