I'm starting in Angular and Firebase and I found an issue: How can I make a select to send the selected value on one side and the id of the value to another doc. Basically I have 2 documents (tables) of firestore, in one I have the products and in another the movements. What I need to do is send the id of the product that I select to a field in the movements table and the name to another field.
So far I have this code but it does not work
Code in the html: (listaprod is the list that comes from the controller)
<select class="form-control col-sm-6" id="nomProd" [(ngModel)]="entradaTemp.nomProd" name="nomProd">
<option *ngFor="let prod of listaprod | async">
{{prod.nombre}}
<span name="idProd" id="idProd" [(ngModel)]="entradaTemp.idProd">{{prod.id}}</span>
</option>
</select>
When I take out the span everything works correctly it allows me to select, it shows me the selection and it records it in the record of entries, but what I can not do is record the name and id in the record of entries.