ergo / polymer-ui-router Goto Github PK
View Code? Open in Web Editor NEWUI-router wrapper for Web Components
License: Apache License 2.0
UI-router wrapper for Web Components
License: Apache License 2.0
Hi,
I'm just wondering where this implementation stands maturity wise, would you recommend using this on a production app?
I'm finding app-router & iron-pages very frustrating and I'd like to find a better solution.. I've used ui-router with angular and found it great.
Is your crossroadsjs implementation further along/more stable?
Hi,
Here I come today because I really liked the UI-Router but I have a Polymer project that needs to manage app routing. So I was glad to find out your UI-Router wrapper for Polymer! :)
But here I am: with AngularJS, I was used to use abstract
states that do not have any HTML or template associated to them, but I was often using them to define "parent" states for nested states. For example (in AngularJS syntax):
$stateProvider
.state('contacts', {
abstract: true,
url: '/contacts'
})
.state('contacts.list', {
url: '/list',
views: { 'app-content@': { template: '<div contacts-list></div>' } }
})
.state('contacts.edit', {
url: '/edit',
views: { 'app-content@': { template: '<div contacts-edit></div>' } }
})
.state('contacts.new', {
url: '/new',
views: { 'app-content@': { template: '<div contacts-new></div>' } }
});
These abstract
states were very useful if you wanted to have a common prefix in a URI without defining any HTML or template associated to them (these are children states that handle HTML rendering).
But I think there is a little bug in your wrapper, and it seems to not take care of the abstract
key in the state definition (in PolymerUiRouter-compliant syntax).
The fact is, for each state I define which is a child of an abstract
state, the associated component is not rendered in the <uirouter-uiview>
. So my route is working, as well as the URL update and my lazy-loading import, but the view component is just not rendered.
Could you take a look at this little bug in the next few days? It could be really useful!
Thanks, and keep up the good work!
PS: Don't hesitate if you need more information about this bug.
It may be a fault on their side but it appears that the demos are not working at all..
As per angular-ui/ui-router#3074 (comment) we probably should continue here on how this component should be implemented.
Any feedback is appreciated.
Hello again,
I'm playing around with the router, verifying it will work for all my use cases
I created a little repo to show what I'm trying to do.. https://github.com/vidhill/polymer-ui-router-poc
And a live githube pages version here: https://vidhill.github.io/polymer-ui-router-poc/build/default/index.html
I am using a subroute..
What I was hoping to be able to do was register the states for the subroutes somewhere besides the root application...
I have it working, to a degree,
I have subroutes under #/dogs/
However, on first load, if I go to #/dogs/terrier it redirects back to the default (cats_route
) state defined using otherwise
-because, as at that point the states that reside under dogs.html haven't been registered yet..
Many Thanks.
I have some data that I was passing down to child elements using binding,
I don't think I can do that with uirouter-uiview
, I thought I might be able to do it using a resolve function but the context for this
is the global element..
<uirouter-uiview current-user-name="[[currentUserName]]" notification-decision="[[notificationDecision]]" >
</uirouter-uiview>
I've read the source and I don't know if this is possible,
I'm trying to write some tests for a wrapper I made for polymer-ui-router
to make it more stateless. Between the tests in karma, it looks like the library is just adding routes instead of overwriting them. (I get an error that the home
route still exists for example.)
Is this known functionality? Should I write a repro?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.