I see examples of one way data binding with the {{my_var}} format but, I do not see a way to bind the change from the HTML side back to the dart object. For example an input box text changing.
There are several examples on Seth Ladd's GitHub space.
Here is a concrete example for a text input binding:
<polymer-element name="my-example">
<template>
<div>
Type something: <input type="text" value="{{message}}">
</div>
<div>
You typed {{message}}
</div>
</template>
<script type="application/dart" src="my_example.dart"></script>
</polymer-element>
import 'package:polymer/polymer.dart';
@CustomTag('my-example')
class MyExample extends PolymerElement with ObservableMixin {
@observable String message;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With