This repository was archived by the owner on Feb 22, 2018. It is now read-only.
This repository was archived by the owner on Feb 22, 2018. It is now read-only.
<input type="number" ng-model="ctrl.foo"> rapidly alternates between int and String #1033
Open
Description
controller...
String _foo = '1';
String get foo => _foo;
void set foo(String value) {
_foo = value;
print('type ${_foo.runtimeType}');
}
template...
<input type="number" ng-model="ctrl.foo">
now try clicking on the buttons that increment or decrement the number.
on the debugging console, you'll see the runtimeType of foo rapidly alternating
between String and int. that's pretty annoying because now you can't declare it
as either. you have to make it dynamic or Object and write all code to handle either.