I have joined a new project and got the code to local. I just started using Angular.
The application is using Angular version 6. I am not sure which type forms are being used.
Is there any way I can find out?
In the following the examples, I thought 1st example was using Reactive forms because of "FormGroup" (Please correct me if I am wrong), and I am not sure about 2nd example.
Html File 1:
<form [formGroup]="loginForm" (ngSubmit)="Login(loginForm.value)" name="login-form" class="form">
<div></div>
</form>
ts file 1:
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
public ngOnInit() {
this.getInitData();
this.loginForm = this.formBuilder.group({
'username': [null, Validators.required],
'password': [null, Validators.required],
'rememberMe': false
});
Html File 2:
<form id="aForm" target="_blank" action="{{Url}}" method="post" #aForm>
<input type="submit" (click)="aForm.submit()" value="submit" />
</form>
ts file 2:
Not mentioned anything about forms.