Answers for "angular viewchild input element value"

1

angular viewchild input element value

// in html
<input #input type="text">
// in .ts
@ViewChild('input') input:ElementRef; 
//Output value
console.log(this.input.nativeElement.value);
Posted by: Guest on October-07-2020

Code answers related to "angular viewchild input element value"

Code answers related to "Javascript"

Browse Popular Code Answers by Language