esnunes / riotjs-loader

riotjs module loader for webpack
MIT License
103 stars 41 forks source link

Router #19

Open daslicht opened 8 years ago

daslicht commented 8 years ago

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 ?

cuu508 commented 8 years ago

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

daslicht commented 8 years ago

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

http://yourserver/fruit