Thanks for the assistance,

This is where I left off, and it works to some degree.

<input type="radio" name="alert" ng-model="data.formData.alert" value="1" 
ng-value="1" ng-change="radioValue()">

When I change any selection it automatically sends the updated formData to 
the server. 
But it sends data.formData so every value in the form gets sent.
What I would like to do is only send the updated info, not the entire form

So the radioValue() function needs to get the new value, and the field

I am just trying things out.



On Saturday, September 12, 2015 at 4:30:57 PM UTC-2:30, Dave Abbott wrote:
>
> I am attempting to get the value of a radio button when changed / selected.
>
> There are 6 sets of true false so 12 radio inputs like:
>
> <input type="radio" ng-model="data.formData.alert" value="1" ng-value="1" 
> ng-change='radioValue(value)'>
> <input type="radio" ng-model="data.formData.alert" value="0" ng-value="0" 
> ng-change='radioValue(value)'>
>
> in the controller:
>
> $scope.radioValue = function(value){
>       console.log(value); //undefined
>     }
>
> Eventually I will also need to get the ng-model that changed so I can send 
> it off to the backend.
>
> Any tips help would be great.
>
> Thanks,
>
> Dave
>
>
>

-- 
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.

Reply via email to