<h2 class="title">Hello {{name}}</h2>
<style>
div {
margin: 20px 10px;
}
</style>
<h1>Hello</h1>
<form [formGroup]="myForm" (ngSubmit)="onSubmit()">
<div>
<select formControlName="status" (change)="onStatusChange()">
<option value="1">Active</option>
<option value="2">Warmup</option>
<option value="0">InActive</option>
</select>
</div>
<ng-container *ngIf="myForm.get('status').value == 1 || myForm.get('status').value == 2">
<div>
<input formControlName="hobbies" placeholder="hobbies">
</div>
<div>
<input formControlName="profile" placeholder="profile">
</div>
</ng-container>
<div>
<input formControlName="test" placeholder="test">
</div>
<div>
<button type="submit">Submit</button>
</div>
<!-- Expression has changed after it was checked. Previous value: 'true'. Current value: 'false'
because of below pre tag -->
<pre>{{myForm.valid}}</pre>
<pre>{{myForm?.value | json}}</pre>
</form>
https://ng-run.com/edit/qDLp6mILN79SXYwsHOUX?open=app%2Fapp.component.html