user47376
user47376

Reputation: 2273

Polymer 1.0 routing solutions?

I'm building an app using Polymer 1.0 and I'm wondering what's my options with respect to routing ? I have seen more-routing but I don't know if it's compatible with 1.0, Is there a good stable declarative routing solution similar to more-routing if it's not supported ?

Upvotes: 2

Views: 354

Answers (4)

codedemon
codedemon

Reputation: 84

Try dna-router. You can create define states and routes in HTML only.

Setup routes by:

<dna-new-state state='home' route='/home'></dna-new-state>

<dna-new-state state='user' route='/user/:id/'></dna-new-state>

Create views by:

<dna-view state='home' element='home-template'></dna-view>

For a detailed documentation, visit : https://github.com/Saquib764/dna-router

Upvotes: 0

LiberQuack
LiberQuack

Reputation: 161

This one is pretty neat, has some features like nesting,query,params it's under development but is very useful

Easy-Router - http://customelements.io/MartinsThiago/easy-router

simple usage example

<page-admin path="#!/admin">
  //Content
</page-admin>

Upvotes: 0

David Douglas
David Douglas

Reputation: 10503

I've been using Pages.js with Polymer 1.0 for client-side routing using the hashbang option. eg. http://localhost:8000/#!/home

Watch the routing Polycast for more info.

Upvotes: 1

Lurch
Lurch

Reputation: 137

Try app router: https://github.com/erikringsmuth/app-router

I'm using it with 1.0 and it works well. My routes are set up declaratively, and I trigger the routing imperatively using on-tap actions.

Upvotes: 1

Related Questions