Skip to content
Javier Escobar edited this page Jun 17, 2018 · 1 revision

A page represents a particular view of a weldkit application. Like web pages, a user may navigate between different views. You may also think about pages as the higher level components, below the app component, that hold dynamic content.

Navigation

To navigate from one page to another, a hyperlink is required that points to the page id. Such an id should have the following format: --. So for example we have an index page of a blog application. Our idex page element is <page-index></page-index>. Now we want to be able to navigate to a blog post using a hyperlink. The blog posts are displayed with a post component that looks like <page-post></page-post>. So in our index page we could have the following:

<page-index>
  <h1>Index</h1>
  <ul>
    <li><a href="#page-post--1">First post</a></li>
    <li><a href="#page-post--2">Second post</a></li>
    <li><a href="#page-post--3">Third post</a></li>
  </ul>
</page-index>

If the user clicks on any of the links, the blog post page will be displayed using the post page component. like <page-post id="page-post--1"> for example.

Clone this wiki locally