Sunday, December 16, 2018

How do I turn back off the read only state on an HTMLFormElement in an Angular 6 application?

Assuming...

@ViewChild('opener') opener: ElementRef<HTMLFormElement>;

 
 

...and assuming...

this.opener.nativeElement.readOnly = "true";

 
 

You may turn back off the read only thing like this.

this.opener.nativeElement.readOnly = "";

 
 

This however will not work.

this.opener.nativeElement.readOnly = "false";

No comments:

Post a Comment