I'm working in Angular 5, and I have some textboxes that use Material
Design extensions.
What I want, is when I come into this screen, from somewhere else, I'm
passing in certain data that gets populated into various controls on the
screen, textboxes being the most common.
The problem is, the validation still shows these controls as in error, as
if they were not filled in. But they are filled in.
They way I set these values is something like:
this.myMatInput.nativeElement.value = "some value";
after setting these values, I've even run updateValueandValidity() on each
of these controls, and even on the form group they belong to. But
unfortunately, validation still shows these controls as being invalid as if
they are not filled in. If I type into those textboxes, they suddenly, the
validation says they are no longer in error.
So how do I set the values so that validation is satisfied?
--
You received this message because you are subscribed to the Google Groups
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.