Routing behavior for Polymer elements.
Structure your application and react to window.location.hash
changes.
<fnx-router>
<a href="#/amazing/stuff">show me amazing stuff</a>
<a href="#/amazing/features">show me amazing features</a>
<your-amazing-element route="amazing">
<fnx-router route="stuff">
<h1>wow!</h1>
</fnx-router>
<fnx-router route="features">
<h1>no way!</h1>
</fnx-router>
...
FnxRouterBehavior from this library allows you to enable routing in any Polymer element.
Constants
- String ATTR_ROUTE_INVISIBLE = "route-invisible"
-
const
Your FnxRouterBehavior elements will have this attribute when visible. Use it to style your elements in CSS.
- String ATTR_ROUTE_VISIBLE = "route-visible"
-
const
Your FnxRouterBehavior elements will have this attribute when visible. Use it to style your elements in CSS.
- String BODY_ATTR_ROUTER_INITIALIZED = "router-initialized"
-
const
Router will add this attribute to the document body after successful initialization.
- String BODY_ATTR_ROUTER_NOT_INITIALIZED = "router-not-initialized"
-
const
Add this attribute to the document body to prevent FUOC.…
Functions
-
For unit testing only.
Classes
- FnxRouterBehavior
-
Routing behavior for Polymer elements.…
-
FnxRouterNavigator is responsible for listening on location.hash changes and distributing changes to the routing tree.…