Listening to Enter Events on Input Text Elements With Angular

Photo by Victor Larracuente on Unsplash

Updated Version

Scenario

Approach

<input (keydown.enter)="save($event)">

Implement the save(event) :

export class SaveComponent { 
save() {
console.log("You entered: ", event.target.value);
}
}

Demo

Brought to You By