I am facing one problem during my development i have created the login form with reactive validation. it is working fine but when i move to different component (like create account) then click on back button/image to come on home page then validation message () stop to display the error but when i click on the submit button it show invalid state but no message is coming. Can someboday help me why this is happening. here is the example:
<Form class="" [formGroup]="loginForm" novalidate>
<input matInput formControlName="email" placeholder="Email" type="email" #email>
<mat-error>
required
</mat-error>
</Form>
First time it is showing but after back button click it is not working i need to refresh the page then it started working.