mirror of
https://github.com/esiur/iui.git
synced 2025-05-06 06:42:58 +00:00
Router
This commit is contained in:
parent
811152f867
commit
1294b0f413
@ -23,7 +23,7 @@ export default IUI.module(class Repeat extends IUIElement
|
||||
/// Create ///
|
||||
//////////////
|
||||
|
||||
console.log(this, this.innerHTML);
|
||||
//console.log(this, this.innerHTML);
|
||||
|
||||
if (this._created)
|
||||
debugger;
|
||||
|
@ -203,14 +203,18 @@ export default IUI.module(
|
||||
|
||||
target.setLoading(true);
|
||||
|
||||
if (stateRoute.dataMap != null) {
|
||||
// if map function failed to call setData, we will render without it
|
||||
if (!(await stateRoute.dataMap.render(data || {})))
|
||||
await stateRoute.render();
|
||||
try {
|
||||
if (stateRoute.dataMap != null) {
|
||||
// if map function failed to call setData, we will render without it
|
||||
if (!(await stateRoute.dataMap.render(data || {})))
|
||||
await stateRoute.render();
|
||||
|
||||
if (viewRoute != stateRoute) await viewRoute.setData(stateRoute.data);
|
||||
} //if (data !== undefined)
|
||||
else await viewRoute.setData(data);
|
||||
if (viewRoute != stateRoute) await viewRoute.setData(stateRoute.data);
|
||||
} //if (data !== undefined)
|
||||
else await viewRoute.setData(data);
|
||||
} catch (ex){
|
||||
console.log("EXXXXXXXXXX", ex);
|
||||
}
|
||||
|
||||
target.setLoading(false);
|
||||
}
|
||||
|
@ -57,8 +57,7 @@ window.addEventListener("afterprint", e => {
|
||||
window.addEventListener("load", async function () {
|
||||
await IUI.create(document.body);
|
||||
await IUI.created(document.body);
|
||||
|
||||
console.log("IUI.create()");
|
||||
|
||||
});
|
||||
|
||||
window.iui = iui;
|
||||
|
Loading…
x
Reference in New Issue
Block a user