I have a textarea for some text input.
When user finish typing, I let them use [Enter] to confirm the text by
<textarea #msgInput (keyup.enter)="confirmText(msgInput.value)" > </textarea>
Although i can successfully get the text inside confirmText().
A newline is created on the value of the textarea.
How do I drop the new-line char to the textarea correctly?
I know there exist some method like return 0 and preventDefault() when writing js but I have no idea how to do it in Angular2 typescript.