akc42 / akc-route Goto Github PK
View Code? Open in Web Editor NEWA distributed router inspired by PolymerElements/app-route
License: MIT License
A distributed router inspired by PolymerElements/app-route
License: MIT License
I removed urlSpaceRegex and its related functionality as it is not so much related to routing, and if you want to use it you can just use <iron-location>
. I haven't reflected that in the readme
The router seems to go into an infinite loop when the outRoute has changed, but it doesn't change the inRoute
I was wondering if there was any way to secure routes? Some combination of the route plus the roles required to access the route.
We have a chain of routes like so
page -> pidcid -> date
date is not active, but has a path
of /20160101
as a result of a previous call some time ago. I adjust the cidpid
parameters so that it now become active and we have to create the outRoute.path
value.
At the moment it is adding on the date path, but I think it should only do that if date was previously active.
There are two errors in the README
There are only two parameters to <akc-location>
the third was related to capturing clicks, which is not implemented as the user can just use an <iron-location>
to achieve the same effect and is therefore out of place in this router
We actually interpret a leading "-" as making a negative integer integer in a segment that otherwise consists solely of the characters "0" to "9". This was the result of #6 where the documentation was not updated
Can we also have regex in if matched? It will open a world of possibilities for the component
I updated a route by setting a new one, which should have propagated to the top. I am beginning to suspect I fell foul of my own rule and dealt with updating the route in a non piecemeal way to support the updates from the api with just parameters or just new query string. ALL these things should be handled via a single observer on the whole route, and the result should be a complete new route when it updated so the changes all remain in sync
I set a new route by setting path, params and query params to a new value that wasn't matched by this if-matches parameter. This was picked up by the _inRouteChanged observer but not processed because the route didn't match. But it was also picked up by _paramsChanged and _queryChanged observers - because the in-route
value is also the out-route
value higher up the tree, but when it got there the route wasn't complete (missing query params and the combination of path and params wasn't correct.)
I think this may require a major change by replacing this piecemeal observers with a complete out-route
observer
in the _outRouteChanged
function with are checking that our params match allowed ones. The check is if (changes.base.params[key]) {
, but this is false of the value of that parameter is zero.
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.