diff --git a/ignite-html-router.js b/ignite-html-router.js index 5c9ab9f..00c08e6 100644 --- a/ignite-html-router.js +++ b/ignite-html-router.js @@ -1,4 +1,4 @@ -import { IgniteHtml } from "../ignite-html/ignite-html.js"; +import { IgniteHtml, IgniteRendering } from "../ignite-html/ignite-html.js"; import { IgniteElement } from "../ignite-html/ignite-element.js"; import { IgniteTemplate, slot, div, html } from "../ignite-html/ignite-template.js"; import { IgniteCallback, IgniteProperty} from "../ignite-html/ignite-html.js"; @@ -76,8 +76,8 @@ IgniteTemplate.prototype.route = function(routes, showCallback = null, hideCallb this._callbacks.push(managedPush); this._callbacks.push(managedPop); - //Create a constructor callback that will update the state upon first load. - this._constructors.push(update); + //Upon ready call update so our view is displayed if needed. + IgniteRendering.ready(update); return this; };