Skip to content

Instantly share code, notes, and snippets.

@filipbech
Created March 7, 2018 19:28
Show Gist options
  • Save filipbech/15971f35768b5b92e263a662a930e412 to your computer and use it in GitHub Desktop.
Save filipbech/15971f35768b5b92e263a662a930e412 to your computer and use it in GitHub Desktop.
element-router
<element-router>
<element-route path="/" element="home-page"></element-route>
<element-route path="/product/:uid" element="product-page"></element-route>
<element-route path="/lazy" import="lazy-element.js" element="lazy-element"></element-route>
<element-route path="/no-element">
<template>
<style>h1 { color:red; }</style>
<h1>Yo this is an inline-template</h1>
</template>
</element-route>
<element-route path="*" redirect="/"></element-route>
</element-router>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment