riotgear

Open full view…

State Based Router

Mike Ward
Mon, 17 Aug 2015 14:57:25 GMT

A state based UI router similar to Angular-UI-Router (can you tell I'm an angular programmer?)

Greg
Fri, 21 Aug 2015 20:59:58 GMT

Have you seen RiotControl? It might be what you're after?

Mike Ward
Sun, 23 Aug 2015 22:31:49 GMT

Yep and it 's a good start. However, it's dependent on Urls for routing. A state based router does not require url routing (but can include it). State based routing makes it much easier to support nested and named views. Angular-UI-Router does this for instance.

Greg
Sat, 29 Aug 2015 16:23:41 GMT

I'm on it ;-)

arham jain
Mon, 31 Aug 2015 18:48:57 GMT

Yes please! I would love something like this!

Greg
Tue, 01 Sep 2015 15:22:56 GMT

How about this? https://github.com/RiotGear/rg-router

arham jain
Tue, 01 Sep 2015 16:54:17 GMT

I saw it this morning. Very nice! Using mixins is a cool way to implement it.

Greg
Tue, 01 Sep 2015 16:57:48 GMT

One of the things I wanted to make sure was to keep the tags and the states uncoupled. So you can use the router how ever you want. One tag could be affected by more than one state, in however you want it to. Setting hidden variables or toggling visibility

Mike Ward
Thu, 03 Sep 2015 22:06:21 GMT

+1

kdakan
Wed, 01 Jun 2016 14:59:55 GMT

Hi, I'm new to state based routers and I cant figure out how to use rg-router from the example given on github demo folder. When should I choose this router instead of the stock router that comes with riot js? Can you share some use cases?

kdakan
Wed, 01 Jun 2016 15:01:38 GMT

Also can you provide an example using nested views?