I am going through this code on github: https://github.com/linnovate/mean and there is something I do not understand. When you look at the register form html code there is no two-way data binding and that I understand since there is no need for them.
My confusion starts when I look at the login form html code.
So my questions are:
Thanks in advance.
They just do that to avoid having to pull data themselves from the form using something like form.controls.email.get('email').value
. With their binding, they directly have the value of the fields in this.email
in the component, and thus can use the simple line 22 in the ts file:
this.authService.login(this.email, this.password)
So, there is no cookies or server-side stuff involved. It is just frontend variable handling.