Greeting,
the whole code is a little long and the whole is here:
https://stackblitz.com/edit/test-trainin-2-gv9glh?file=src%2Fapp%2Fapp.component.ts
First check this field:
<input
oninput="javascript: if (this.value.length > this.maxLength) this.value = this.value.slice(0, this.maxLength);"
type="number"
class="input-invisible-for-div weight width-45 font-s"
maxlength="3"
minlength="1"
max="600"
min="0"
[(ngModel)]="selectedValue ? selectedValue : training.selected"
/>
This is a field that needs to be editable
It is field which i need to send as value here:
const objToSend2 = {
setId: jotOfSet,
reps: set.reps,
value: this.selectedValue,
completed: true
}
The current value of this field is initially see onIniti
el["selected"] = el.sets[0]?.value;
When you click the ball twice, the value of that field is the next value..
All I want is to be able to change that field as much as I want and this addition of +5 and -5
On double click on ball I call first function singleClickForTraining then inside singleClickForTraining i call finishedExerciseSet.
question from:
https://stackoverflow.com/questions/65883510/how-to-make-an-editable-field-angular 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…