I need to add option.lastname
data along with option.name data inside option.
I found this way to convert the id to int works perfect but I am not being able to bring me the last name, it only leaves me one.
<select class="form-control"
ng-model="dog.owner_id"
convertToNumber
ng-change="selectOwner(dog.owner_id)"
ng-options="convertToInt(option.id) as option.name for option in owners">
<option value="">Seleccione</option>
</select>
Before I had it like this but since I had to convert the ID to int it did not work for me:
<option value="@{{option.id}}" ng-repeat="option in owners">
<b> @{{option.name}} @{{option.lastname}}</b>
</option>