Closed
Description
Given the following element and accompanying model, the input is not initialised with the default title of "asdf".
<polymer-element name="todo-list">
<template>
<form>
<input id="title" type="text" value="{{ title }}" placeholder="New Todo Title">
<button type="button" on-click="add">Add</button>
</form>
<ul>
<template repeat="{{ todos }}">
<li>{{ title }}</li>
</template>
</ul>
</template>
<script>
Polymer('todo-list', {
title: 'asdf',
todos: [],
add: function() {
this.todos.push({ title: this.title });
this.$.title.value = '';
}
});
</script>
</polymer-element>
Metadata
Assignees
Labels
No labels