Trouble when working with Radio button in Angular Dart
I tried your code. After some experimenting I saw that switching the order of the attributes ng-model
and value
solves the problem. I would consider this a bug.
<!DOCTYPE html><html ng-app> <body> <div my-controller> <div ng-repeat="fruit in ctrl.fruits"> <input type="radio" name="fruits" value="{{fruit}}" ng-model="ctrl.favorite" >{{fruit}}</div> <div>{{ctrl.favorite}} is my favorite</div> </div> <script type="application/dart" src="main.dart"></script> <script type="text/javascript" src="packages/browser/dart.js"></script> </body></html>