SIGN IN SIGN UP
angular / angular.js UNCLAIMED

AngularJS - HTML enhanced for web apps!

0 0 0 JavaScript

fix(input[radio]): use strict comparison when evaluating checked-ness

Closes #15283
Closes #15288

BREAKING CHANGE:

When using input[radio], the checked status is now determined by doing
a strict comparison between the value of the input and the ngModel.$viewValue.
Previously, this was a non-strict comparison (==).

This means in the following examples the radio is no longer checked:

```
  <!-- this.selected = 0 -->
  <input type="radio" ng-model="$ctrl.selected" value="0" >

  <!-- this.selected = 0; this.value = false; -->
  <input type="radio" ng-model="$ctrl.selected" ng-value="$ctrl.value" >
```

The migration strategy is to convert values that matched with non-strict
conversion so that they will match with strict conversion.
M
Martin Staffa committed
5ac7daea72ec31cf337d1d21b13f0d17ff33994f
Parent: b5a5623
Committed by GitHub <noreply@github.com> on 11/8/2016, 3:42:39 PM