angular - Check if nativeComponent has class -


i've tried check if form pristine:

@viewchild('myform') form : elementref;  var pristine = this.form.nativeelement.hasclass('ng-pristine') 

however, error:

this.form.nativeelement.hasclass

so, apparently, solution angular 1 (how check if element has class angularjs?) doesn't work here.

what way in angular 2?


Comments

Popular posts from this blog

php - trouble displaying mysqli database results in correct order -

depending on nth recurrence of job in control M -

sql server - Cannot query correctly (MSSQL - PHP - JSON) -