Working on angular 1.5.x
I am using radio buttons but not using string values to be stored in model, instead it is a object.
The two way binding is giving issue and UI does not reflect the radio button selected based on model value. So you select something it gets selected and value in the model is present.There is a save function which will save the values. And when you reload the page or reopen the Radio button should be selected based on value present in model. That is when the 2 way binding failing.
Model
Option opt{
Yes:"Yes"
No:"No"
Maybe:"May be"
}
here Yes,No ,May Be are three radio checkbox in a row for same label. When i select Yes the model will have the Yes:"Yes" object , and when we open the page after saving the model values to server the UI should automatically select Yes Radio button as checked because model already have value Yes. Template
<input ng-value="{{opt}}" ng-model="request.opt" type="radio">
Tried different solutions but not working. Instead of ng-value used value but that only supports string not objects so will not support the use case.
In ng-value case the model value does not reflect on screen UI.While saving the selected radio to server don't have any issue the model have correct values but while opening page again the radio is not getting checked based on model value, it simply comes blank for all the radio buttons in that group.