html-router

A router designed with simplicity in mind where you dont have to touch any javascript if you dont want to.

Usage no npm install needed!

<script type="module">
  import htmlRouter from 'https://cdn.skypack.dev/html-router';
</script>

README

html-router

A router designed with simplicity in mind.

Fiddle demo

<body>
  <router-view></router-view>

  <router-route path="/" redirect="/home"></router-route>

  <router-route path="/home">
      <h1>Home!</h1>
      <button onclick="router.push('/login')">Load Login!</button>
  </router-route>

  <router-route path="/login">
      <h1>Login!</h1>
      <button onclick="router.push('/home')">Load Home!</button>
  </router-route>

  <script src="https://unpkg.com/html-router"></script>
</body>