Created
September 29, 2016 01:18
-
-
Save liamfiddler/e744d92b2221f0968d9dfd4072a59216 to your computer and use it in GitHub Desktop.
Creating a Web Component with Polymer - Part 1 - 03 List
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
<link rel="import" href="../polymer/polymer.html"> | |
<!-- | |
`my-listfilter` | |
A filterable list component | |
@demo demo/index.html | |
--> | |
<dom-module id="my-listfilter"> | |
<template> | |
<style> | |
:host { | |
display: block; | |
} | |
.hidden { | |
display: none; | |
} | |
</style> | |
<input value="{{prop1::input}}" /> | |
<h2>Hello [[prop1]]</h2> | |
<ul id="list"> | |
<li>Hypertext Markup Language</li> | |
<li>Cascading Style Sheets</li> | |
<li>Javascript</li> | |
<li>Web Components</li> | |
<li>Polymer</li> | |
<li>Web Browser</li> | |
<li>Mentally Friendly</li> | |
</ul> | |
</template> | |
<script> | |
Polymer({ | |
is: 'my-listfilter', | |
properties: { | |
prop1: { | |
type: String, | |
value: 'my-listfilter', | |
}, | |
}, | |
}); | |
</script> | |
</dom-module> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment