Commit c90cefe
committed
feat(input): support constant expressions for ngTrueValue/ngFalseValue
ngTrueValue and ngFalseValue now support parsed expressions which the parser determines to be constant values.
BREAKING CHANGE:
Previously, these attributes would always be treated as strings. However, they are now parsed as
expressions, and will throw if an expression is non-constant.
To convert non-constant strings into constant expressions, simply wrap them in an extra pair of quotes, like so:
<input type="checkbox" ng-model="..." ng-true-value="'truthyValue'">
Closes angular#8041
Closes angular#5346
Closes angular#11991 parent 8121449 commit c90cefe
File tree
3 files changed
+66
-13
lines changed- docs/content/error/ngModel
- src/ng/directive
- test/ng/directive
3 files changed
+66
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
807 | 807 | | |
808 | 808 | | |
809 | 809 | | |
810 | | - | |
811 | | - | |
| 810 | + | |
| 811 | + | |
812 | 812 | | |
813 | 813 | | |
814 | 814 | | |
| |||
824 | 824 | | |
825 | 825 | | |
826 | 826 | | |
827 | | - | |
| 827 | + | |
828 | 828 | | |
829 | 829 | | |
830 | 830 | | |
| |||
1183 | 1183 | | |
1184 | 1184 | | |
1185 | 1185 | | |
1186 | | - | |
1187 | | - | |
1188 | | - | |
| 1186 | + | |
| 1187 | + | |
| 1188 | + | |
| 1189 | + | |
| 1190 | + | |
| 1191 | + | |
| 1192 | + | |
| 1193 | + | |
| 1194 | + | |
| 1195 | + | |
| 1196 | + | |
| 1197 | + | |
1189 | 1198 | | |
1190 | | - | |
1191 | | - | |
| 1199 | + | |
| 1200 | + | |
| 1201 | + | |
1192 | 1202 | | |
1193 | 1203 | | |
1194 | 1204 | | |
| |||
1208 | 1218 | | |
1209 | 1219 | | |
1210 | 1220 | | |
1211 | | - | |
| 1221 | + | |
1212 | 1222 | | |
1213 | 1223 | | |
1214 | 1224 | | |
| |||
1356 | 1366 | | |
1357 | 1367 | | |
1358 | 1368 | | |
1359 | | - | |
| 1369 | + | |
| 1370 | + | |
1360 | 1371 | | |
1361 | 1372 | | |
1362 | 1373 | | |
1363 | 1374 | | |
1364 | 1375 | | |
1365 | 1376 | | |
1366 | | - | |
| 1377 | + | |
1367 | 1378 | | |
1368 | 1379 | | |
1369 | 1380 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2528 | 2528 | | |
2529 | 2529 | | |
2530 | 2530 | | |
2531 | | - | |
2532 | | - | |
| 2531 | + | |
| 2532 | + | |
2533 | 2533 | | |
2534 | 2534 | | |
2535 | 2535 | | |
| |||
2554 | 2554 | | |
2555 | 2555 | | |
2556 | 2556 | | |
| 2557 | + | |
| 2558 | + | |
| 2559 | + | |
| 2560 | + | |
| 2561 | + | |
| 2562 | + | |
| 2563 | + | |
| 2564 | + | |
| 2565 | + | |
| 2566 | + | |
| 2567 | + | |
| 2568 | + | |
| 2569 | + | |
| 2570 | + | |
| 2571 | + | |
| 2572 | + | |
| 2573 | + | |
| 2574 | + | |
| 2575 | + | |
| 2576 | + | |
| 2577 | + | |
2557 | 2578 | | |
2558 | 2579 | | |
2559 | 2580 | | |
| |||
0 commit comments