Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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);
 
PREVIOUS NEXT
Tagged: #angular #viewchild #input #element
ADD COMMENT
Topic
Name
3+9 =