Created
March 16, 2015 18:33
-
-
Save nevir/a96a5c19b3c2f6ff4013 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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