You're on the right track here. The only problem is that the value
attribute of the input element is a string. One way to do it is like this:
<!-- calc.html -->
<polymer-element name="my-calc">
<template>
<label>Price</label>
<input value='{{ price }}'>
<label>Qty</label>
<input value='{{ qty }}'>
<label>Total</label>
<input value='{{ int.parse(price) * int.parse(qty) }}'>
</template>
<script type="application/dart" src="calc.dart"></script>
</polymer-element>
//calc.dart
import 'package:polymer/polymer.dart';
@CustomTag('my-calc')
class CalcElement extends PolymerElement {
@observable String price = "0";
@observable String qty = "0";
CalcElement.created() : super.created();
}