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

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -