Currently, I am working on developing a Reactive form using Angular 6. In my TypeScript file, I have successfully obtained the form instance along with form controls. The next step involves iterating through these form controls and displaying the user input values. However, upon running 'ng serve' in the browser console, an error is encountered.
Below is the snippet of the code: HTML
<div >
<h2>Login</h2>
<form class='form' [formGroup]='loginForm' (ngSubmit)='onSubmit()'>
.
.
.
In the image linked below, you can see that my form fields are occupying the entire screen: https://i.sstatic.net/Fk88c.jpg However, I aim to align all the form controls centrally on the screen by ensuring equal spacing on the left, right, top, and bottom. Kindly provide guidance or code snippets to address this layout issue.