Sfoglia il codice sorgente

Add support for relative paths as issue #9

Shaun 1 anno fa
parent
commit
719439d9b6
1 ha cambiato i file con 5 aggiunte e 0 eliminazioni
  1. 5 0
      README.md

+ 5 - 0
README.md

@@ -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>
 <template x-route="/path/to/route" template="/path/to/template.html"></template>
 <!-- Preload the separate template file -->
 <!-- Preload the separate template file -->
 <template x-route="/path/to/route" template.preload="/path/to/template.html"></template>
 <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 -->
 <!-- When declaring a template that is not found, the path parameter does not need to be specified -->
 <template x-route.notfound>
 <template x-route.notfound>