Reactive form validator is not working on back button (browser)- angular

17 views
Skip to first unread message

nittin aggarwal

unread,
Sep 7, 2020, 7:11:17 AM9/7/20
to Angular and AngularJS discussion
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. 
Reply all
Reply to author
Forward
0 new messages