-
This looks interesting but I'm struggling to understand how the pieces go together. Is there a working example somewhere? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Hey, not yet sorry! I'll set up one very soon and link it! <!DOCTYPE html>
<html lang="en">
<head>
<script src="https://cdn.jsdelivr.net/gh/rehhouari/[email protected]/dist/complete.umd.js"></script>
<script src="https://cdn.jsdelivr.net/gh/alpinejs/[email protected]/dist/alpine.min.js" defer></script>
</head>
<body>
<script>
function handle() {
return {
main() {
console.log('main');
},
hello(context) {
console.log('hello,', context.props.name);
},
notfound(context) {
console.error(context.path + ' is not found');
}
};
}
</script>
<div x-data="handle()" x-router>
<template x-route="/hello/:name" x-handler="hello"></template>
<template x-route="/" x-handler="main"></template>
<template x-route="notfound" x-handler="notfound"></template>
</div>
<nav class="">
<a href="/">Home</a>
<a href="/hello/test">Hello</a>
<a href="/about">About</a>
</nav>
</body>
</html> |
Beta Was this translation helpful? Give feedback.
-
there is now: https://pinecone-example.vercel.app |
Beta Was this translation helpful? Give feedback.
there is now: https://pinecone-example.vercel.app