vtechmonkey
vtechmonkey

Reputation: 123

Angular 2 and AuthO keep form data while user logs in

we want users to log in after they have completed a form(not related to logging in). So after logging in they should return to their completed but unsubmitted form. What approach should I take? Am I locally saving the form data? or is it a condition of submitting the form?

Upvotes: 0

Views: 60

Answers (1)

Erndob
Erndob

Reputation: 2612

Yeah, you can easily just save the form data, login the user and redirect him back to the form populating the fields with data you stored.

Another approach would be to never actually close the form. Both can exist at the same time. Your login form is separate component. You can create a modal on top of your form and have login form in that modal. Just make sure to not redirect anywhere after logging and and just close the modal instead.

Upvotes: 1

Related Questions