                                root-props (merge
                                             props
                                             active-route)
-                               element-tree (get-element-tree @routes path root-props render-module-status)]
+                               element-tree (get-element-tree @routes path root-props ModuleStatus)]
                            element-tree))
                        )))]
        {:root-class           AppRoot

            (recur (butlast p) new-params new-query))))
      )))

(defui ModuleStatus
  Object
  (initLocalState [_]
    {:status :loading})
  (componentWillMount
    [this]
    (let [{:keys [module-id]} (om/props this)
          manager (module-manager/getInstance)]
      (if-let [module (.getModuleInfo manager module-id)]
        (let [on-error (.registerErrback module (fn [_] (om/update-state! this assoc :status :error)))
              on-load (.registerCallback module (fn [_] (om/update-state! this assoc :status :success)))]
          (om/update-state! this assoc :on-err on-error)
          (om/update-state! this assoc :on-load on-load)))))
  (componentWillUnmount [this]
    (let [{:keys [on-error on-load]} (om/get-state this)]
      (when on-error (.abort on-error))
      (when on-load (.abort on-load))))
  (render [this]
    (let [{:keys [render-status module-id]} (om/props this)
          {:keys [status]} (om/get-state this)]
      (when render-status (render-status status module-id)))))

(defn get-element-tree
  [route-map path root-props render-module-status]

     (add-watch routes :route/hierarchy (fn [_ _ _ next-state]
                                          (reset! route-hierarchy (u/create-hierarchy next-state))))
     (let [set-active-route! #(reset! active-route %1)
           ModuleStatus (when render-module-status
                          (module-status render-module-status))
           AppRoot
           (ui
             static om/IQueryParams
