Is there a more clever way of retrieving template component classes than using nativeElement reference:
this.classes= elm.nativeElement.getAttribute('class');
Which will return list of classes in string form, but I believe there is much more clever way of doing that...
Background:
I'm trying to set type property of input type="password" basing on ng-pristine class without using CSS. So it's basically toggling between text and password basing on ng-pristine.
<input #inp="ngForm" [type]="inp.pristine ? 'text' : 'phone'">, but no guarantees this will do anything useful.dirtyproperty of FormControl. Works fine. If no further solutions will pop out I'' post it as answer