I currently have a variable named dummy_value and I would like to update it using an input box.
<p>{{dummy_value}}</p>
<input [(ngModel)]="dummy_value" />
Upon making this change, the dummy_value updates instantly due to the two-way binding. However, I am looking for a way to update it after receiving a response from an API without having to create an additional variable.
public modifyInput() {
this.my_service.updateInput(this.dummy_value)
.then(response => {
// add modifications here.
}
}
Is there a possible solution for accomplishing this task? Your help is greatly appreciated.