ngx-typesafe-forms
ngx-typesafe-forms copied to clipboard
pristine$ not working
Hello, let's consider the following code:
public aController : FormControl<AType> = new FormControl<AType>(null);
public onSetPristine(){ this.aController.markAsPristine();}
then within the html
<input [formControl]="aController">
<button (click)=onSetPristine()>Set pristine</button>
{{aController.pristine$|async}}
Initially, aController.pristine$ is true, when I change the controller it becomes false as expected. But when I mark the controller as pristine (click on "Set pristine") aController.pristine$ stays false. The regular non observable aController.pristine goes however back to true.
In short: aController.pristine$ is broken somewhere. The same applies to dirty$