In response to a similar question , that is, over a year, I read about a simple way to disable a button using data binding in Dart (and polymer dart).
My current code is as follows:
HTML:
... <button id="btnPointDown" on-click="{{decrement}}" disabled="{{points == 0}}">\/</button> ...
.dart:
... @published int points = 0; void increment() { points++; } void decrement() { points--; } ...
However, Dart no longer seems βsmartβ about a disabled item.
How to use modern Dart and Polymer to disable a button using data bindings (or, if this is not possible programmatically)?
dart polymer dart-polymer
snowdragon
source share