0
I have this code that is making vm.service.type = serviceType.name :
<div class="form-group ">
<label for="field_type"><b>Type</b></label>
<div class="input-icon right">
<select required class="form-control"
id="field_type"
name="type"
ng-model="vm.service.type"
ng-options="serviceType.name as serviceType.name for serviceType in vm.servicetypes">
<option></option>
</select>
</div>
<div ng-show="vm.service.type==null" class="form-group has-error">
<p class="help-block" ng-show="vm.service.type==null" data-translate="entity.validation.required">
This field is required.
</p>
</div>
</div>
How do I get vm.service.serviceTypeId = serviceType.id... This without adding another field to the form.
Note: These variables already exist in the controller and I already have everything necessary to do what I want.