A custom element can contain it’s own data source and be its own data model, as this example shows. The script provides a JavaScript¬†object “salutations” containing a list of 4 objects with properties “what” and¬†“who”.

The inner template sets a repeat property that processes each “who/what” object “s” in salutations. The contents of the template is a mix of html and mustachioed object notations that results in a repeater containing labels and text inputs as shown in the inset from the resulting page.

Source Code Explainer


My Feature Branch

Polymer.org Example

Live example