Skip to content

Commit

Permalink
Add support for relative paths as issue #9
Browse files Browse the repository at this point in the history
  • Loading branch information
shaunlee committed Feb 5, 2024
1 parent 6cd2152 commit 719439d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,11 @@ Declare routes by creating a template tag with `x-route` attribute.
<template x-route="/path/to/route" template="/path/to/template.html"></template>
<!-- Preload the separate template file -->
<template x-route="/path/to/route" template.preload="/path/to/template.html"></template>
<!-- Relative paths -->
<template x-route="/path/to/route" template="template.html"></template>
<template x-route="/path/to/route" template="./template.html"></template>
<template x-route="/path/to/route" template="../template.html"></template>
<template x-route="/path/to/route" template="../../template.html"></template>

<!-- When declaring a template that is not found, the path parameter does not need to be specified -->
<template x-route.notfound>
Expand Down

0 comments on commit 719439d

Please sign in to comment.