From fd0e1fb8776189cec14e3d0ffaf960912bbd3d1c Mon Sep 17 00:00:00 2001 From: Marek Piasecki Date: Tue, 10 Jan 2023 16:52:06 +0100 Subject: [PATCH] fix: imba2 and web components works correctly only with names longer than 1 word --- src/router_tag.imba | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/src/router_tag.imba b/src/router_tag.imba index 058901c..e7aed71 100644 --- a/src/router_tag.imba +++ b/src/router_tag.imba @@ -1,4 +1,8 @@ -tag toggle +tag pro-router + prop view + <{ "view-{view || R.view }" }> + +tag pro-toggle prop param prop disabled @@ -7,23 +11,23 @@ tag toggle def render -tag ref-f # f - forget current params in new destination +tag pro-ref-f < a # f - forget current params in new destination prop view - prop target = {} + prop params = {} prop go def render let link = go || url - + get url - R.to_path view, target + R.to_path view, params -tag ref < ref-f +tag pro-ref < pro-ref-f get url - #target = JSON.parse JSON.stringify(target) # duplicate object - #target[k] ||= v for own k, v of R.safe_params - R.to_path view, #target + #params = JSON.parse JSON.stringify(params) # duplicate object + #params[k] ||= v for own k, v of R.safe_params + R.to_path view, #params -tag not_found +tag view-not_found

"Page not found :(" \ No newline at end of file