   [:div.col.col-xs-12.col-md-12.bootcards-list {:id "main-page"}
    [:h1 "main-page"]
    [widget-box]])
+
+(defroute widget-route "/:id" [id]
+  (.log js/console  "widget-route" id) 
+  (let [widget-id (read-string id)] 
+    (reagent/render-component [widget-view widget-id] (gdom/getElement "content"))))
+
+(let [h (History.)]
+  (goog.events/listen h goog.history.EventType.NAVIGATE #(secretary/dispatch! (.-token %)))
+  (doto h
+    (.setEnabled true)))
 
 (reagent/render-component [main-page] (gdom/getElement "content"))
 

    
    c))

(defn widget "a widget"
  [{:keys [name] :as x}]
  ;; (println "widget " x)
  ;; :li.widget
  [:a.widget.list-group-item {:href "#"}
   [:h4..list-group-item-heading "widget card"] 
   [:label.list-group-item-text name]
   ;; [:span.glyphicon.glyphicon-chevron-right.pull-right]

     [:h3 "widget-list"]
     [:ul.list-group
         (for [item  @state]
           ^{:key (str "widget" (rand-int 100))} [widget-item item])]])

(defn widget-box []
  [:div.widget-box.panel.panel-default
