Skip to content

Commit 5fd5e00

Browse files
committed
fix(ionRadio): make value attribute work
1 parent 6f4cc9f commit 5fd5e00

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Diff for: js/angular/directive/radio.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
*
1212
* @usage
1313
* ```html
14-
* <ion-radio ng-model="choice" ng-value="A">Choose A</ion-radio>
15-
* <ion-radio ng-model="choice" ng-value="B">Choose B</ion-radio>
16-
* <ion-radio ng-model="choice" ng-value="C">Choose C</ion-radio>
14+
* <ion-radio ng-model="choice" ng-value="'A'">Choose A</ion-radio>
15+
* <ion-radio ng-model="choice" ng-value="'B'">Choose B</ion-radio>
16+
* <ion-radio ng-model="choice" ng-value="'C'">Choose C</ion-radio>
1717
* ```
1818
*/
1919
IonicModule
@@ -40,6 +40,7 @@ IonicModule
4040
compile: function(element, attr) {
4141
if(attr.name) element.children().eq(0).attr('name', attr.name);
4242
if(attr.icon) element.children().eq(2).removeClass('ion-checkmark').addClass(attr.icon);
43+
if(attr.value) element.children().eq(0).attr('value', attr.value);
4344
}
4445
};
4546
});

0 commit comments

Comments
 (0)