<div style="padding-left:25%;" > <button type="submit" class="btn" id="button" *ngIf="!profileForm.controls['password'].invalid && !profileForm.controls['mailid'].invalid">Submit</button> </div>