Skip to content

Instantly share code, notes, and snippets.

@nevir
Created March 16, 2015 18:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nevir/a96a5c19b3c2f6ff4013 to your computer and use it in GitHub Desktop.
Save nevir/a96a5c19b3c2f6ff4013 to your computer and use it in GitHub Desktop.
<polymer-element name="x-foo">
<template>
<form action="{{ searchUrl(q) }}" method="post">
<paper-input-decorator class="search" label="Search ..." floatingLabel>
<input is="core-input" value="{{q}}">
</paper-input-decorator>
</form>
</template>
<script>
Polymer('x-foo', {
// Note that we're passing `q` in here so that the binding system can be aware
// of changes to `q` and update the URL.
searchUrl: function(q) {
return MoreRouting.urlFor('search', {query: q});
},
});
</script>
</polymer-element>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment