riotjs-loader icon indicating copy to clipboard operation
riotjs-loader copied to clipboard

Router

Open daslicht opened this issue 9 years ago • 2 comments

Hi, I tried adding a route like this:

require('./name.tag');

<app>
  <name first="Hello" last="World"></name>
  <name first="Ola" last="Mundo"></name>
  <name first="Hallo" last="Welt"></name>
</app>


<script>
riot.route('/fruit', function(name) {
  console.log('The list of fruits');
})
riot.route.start(true);

</script>

But it is not found ?

daslicht avatar Feb 13 '16 16:02 daslicht

@daslicht what URL are you requesting in the browser? It is http://yourserver/#fruit not http://yourserver/fruit

cuu508 avatar May 31 '16 13:05 cuu508

->>> riot.route('/fruit',

http://yourserver/fruit

daslicht avatar May 31 '16 16:05 daslicht