Skip to content

Instantly share code, notes, and snippets.

@MarkArts
Created April 26, 2015 18:57
Show Gist options
  • Save MarkArts/e9d40e74cd152b4794dc to your computer and use it in GitHub Desktop.
Save MarkArts/e9d40e74cd152b4794dc to your computer and use it in GitHub Desktop.
designer
<!DOCTYPE html>
<html>
<head>
<title>Polymer Rails Example</title>
<link rel="import" href="../polymer/polymer.html">
<link rel="import" href="../paper-button/paper-button.html">
</head>
<body>
<paper-button raised>Fancy</paper-button>
<more-routing-config driver="path"></more-routing-config>
<more-route name="user" path="/users/:userId">
<more-route name="user-bio" path="/bio"></more-route>
</more-route>
<more-route-selector selectedParams="{{params}}">
<core-pages>
<section route="/">
This is the index.
</section>
<section route="/about">
It's a routing demo!
<a href="{{ urlFor('user-bio', {userId: 1}) }}">Read about user 1</a>.
</section>
<section route="user">
<header>Heyo user {{params.userId}}!</header>
<template if="{{ route('user-bio').active }}">
All the details about {{params.userId}} that you didn't want to know...
</template>
</section>
</core-pages>
</more-route-selector>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment