How to cast md ElementRef to HtmlElement in angular 2+

Viewed 18017

I have

 <input mdInput #try  placeholder="Favorite food" value="Sushi">

and I get it in ts by

 @ViewChild('try') myText : ElementRef;

and now I need to get approach to HtmlElement Function ,how I can Cast it?

and I don't want by this way add id="try" to mdInput and get it by :

var cel= document.getElementById("try");
1 Answers
Related