Overview
Introduction
This page is an introduction to the path-router custom element. It provides a description of the library and acts as a reference for documentation and examples.
Custom Element
The <path-router> element allows developers to show and hide sections of html contained in "routes" which can either be defined using <route-page> or route-dialog child elements.
The element is designed to provide simple navigation for HTML content.
Routing is done by matching the the <path-router> element's path attribute to one of its child route's path attributes.
Matching path values can be as simple as exact string matches. Routing can be done without any type of dynamic content.
The <path-router> element does, however, account for dynamic content allowing complex matching that uses common string patterns for variables.
Installation
This library is available as a single file that can be referenced using a <script> element. It can also be installed using any of the javascript package managers below:
npm install @magnit-ce/path-router