How to send the form the value of the select?

<form ng-submit="send_ticket()">
 <div class="modal-body">
 <div class="form-group">
 <label for="ticketSubject">Subject</label>
 <input class="form-control" type="text" ng-model="ticketData.subject" required id="ticketSubject">
 <div class="form-group" ng-controller="ServicesCtrl">
 <label for="ticketService">Service</label>
 <select class="form-control" ng-model="ticketData.service" id="ticketService" ng-options="opt as for opt in services">
 <option value>Select service</option>
 <div class="modal-footer">
 <button type="button" class="btn btn-white" ng-click="cancel()">Close</button>
 <button type="submit" class="btn btn-primary">Send</button>

controller('ServicesCtrl', function($scope, $http) {
 .success(function(data) {
 $ = data;

 {"id": "1", "desc": "Description", "date": "date", "status": "success"},
 {"id": "2", "desc": "Description", "date": "date", "status": "success"},
 {"id": "3", "desc": "Description", "date": "date", "status": "success"},
 {"id": "4", "desc": "Description", "date": "date", "status": "success"},
 {"id": "5", "desc": "Description", "date": "date", "status": "success"}

$scope.send_ticket = function() {
 $'', $scope.ticketData)

The form is submitted all values of an element, how to send only the id?
September 19th 19 at 00:28
1 answer
September 19th 19 at 00:30
Show the value of $ and what should be sent in ticketData.service on the server? There is a feeling that you don't want to send the entire object opt.
$ added to send how to send id not understood. - Zechariah.Grady commented on September 19th 19 at 00:33
ng-options=" as opt.status for opt in services"

I believe you need. - jodie.Grah commented on September 19th 19 at 00:36
: thanks for the help, the right option for me as for opt in services - Zechariah.Grady commented on September 19th 19 at 00:39

Find more questions by tags Angular