Hi,
I have this working code that binds data to a radio button both
ways. I understand when $parent is required and when it is not. Now I am
looking for some ideas to create a table of radio buttons. Each row is a
radio button group. So if there are two rows two radio button, one from row
1 and the other from row 2 can be selected.
How do I bind the data to groups of radio buttons like this ?
Thanks,
Mohan
$scope.currentlySelectedButton = "Button2";
$scope.testbutton = {
name: "Button",
currentButton: "Button3",
somethingelse: "somethingelse"
};
$scope.buttons =
[
"Button1", "Button2",
"Button3", "Button4"
];
<label data-ng-repeat="b in buttons">
<input
name="currentButton"
type="radio"
value="{{b}}"
ng-model="testbutton.currentButton" />
{{b}}
</label>
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.