Angular Radio Inputs require two clicks to change selected state

29 views
Skip to first unread message

Uri Grinwald

unread,
Mar 8, 2016, 10:39:22 PM3/8/16
to AngularJS
Pretty new to Angular and have spent a couple of days with no luck.

I am binding a radio group of buttons to an object with key/value pairs.
The data changes properly when I select radio buttons, but the actual radio button itself does not change to 'selected' until a second click?
When I tried to change the ng-click to ng-change I get the reverse affect of the selection changing but not the data. I am using ng-value vs value in the html as I am dealing with object vs strings.
Here is an example plunk

Augustas Grikšas

unread,
Mar 9, 2016, 12:48:23 AM3/9/16
to AngularJS
Try this one, https://plnkr.co/ is this what you want?

Uri Grinwald

unread,
Mar 9, 2016, 9:31:50 AM3/9/16
to ang...@googlegroups.com
Yes, this is great Augustas. Thank you so much.
So do you mind explaining what I was doing wrong?
I notice that the need for ng-model and value/ng-model was not needed at all?
When I was looking at the basic Angular radio button example, (https://docs.angularjs.org/api/ng/input/input%5Bradio%5D) they used both.


--
You received this message because you are subscribed to a topic in the Google Groups "AngularJS" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/angular/Gl2xHPQ_mQA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to angular+u...@googlegroups.com.
To post to this group, send email to ang...@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages