nuejs / nue

A web framework for UX developers

Home Page:https://nuejs.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Page router doesn't mount components. Refresh needed to properly mount.

Korab-Doroci opened this issue · comments

Minimum reproducible scenario:

Index.html:
image

Site.yaml: (when router is false it works as intended)
image

Page index.html:
image

Component.nue:
image

Before clicking the button:
image

After clicking the button:
image

After refreshing:
image

Thanks! Need to check this out

@Korab-Doroci The Nue layout system is based on <header>, <main> and <footer> tags. Page router is searching for these tags to replace its content.

In your example code should look like this:

// index.html
<main>
  <a href="/page">go to page</a>
</main>
// page/index.html
<main>
  <component />
</main>

However the page router indeed does not mount components correctly. I prepared a PR with fix for this functionality in #271.