Your code it's a bit confussed. Really I can not imagine you want to do so, But..
First. When we has an input, in Angular we use [(ngModel)]="variable"
. This makes that in our .ts we has the value of the variable an in the .html we show the value of the variable.
So, define four variables in your .ts
gender:string
impact:string
fromDate:any
toDate:any
And your "form" to Apply must be like
Gender:<select [(ngModel)]="gender">
...
</select>
Impact:<select [(ngModel)]="impact">
...
</select>
<input type="date" [(ngModel)]="fromDate">
<input type="date" [(ngModel)]="toDate">
class="form-control form-control-sm"
name="gender"
ngModel
[ngModelOptions]="{updateOn: 'submit'}"
>
Idem when you loop over the categories you can use an auxiliar array
categories:boolean[]=[]
And use
<ul *ngFor="let list of dlCategory">
<div class="form-check form-check-inline">
<input type="checkbox" [(ngModel)]="categories[i]
name="{{list.name}}">
<label class="form-check-label" for="">{{list.label}}</label>
</div>
</ul>
Well, I tell you in your before post how "convert" an list of checked values in an array with the values checked, this SO
So instead create an array of booleans with true,false, we are going to makes that a property of the "user" becomes an with the values selected
<ul *ngFor="let list of dlCategory">
<div class="form-check form-check-inline">
<input #check type="checkbox"
[ngModel]="user.categories.indexOf(list.name)>=0"
(ngModelChange)="onChange(list.name,check.checked)"
name="{{list.name}}">
<label class="form-check-label" for="">{{list.label}}</label>
</div>
</ul>
And the onChange becomes like
onChange(option:string,checked:boolean)
{
if (checked && this.user.categories.indexOf(option)<0)
this.user.categories=[...this.user.categories,option]
.sort((a,b)=>this.dlCategory.findIndex(x.name==a)>this.dlCategory.findIndex(x.name==b)?1:-1)
if (!checked)
this.user.categories=this.user.categories.filter(x=>x!=option)
}
Finally, when we want to show the data of the categories, we can iterate over dlCategory and show only if the cat is in user.categories
<div *ngFor="cat of dlCategories;let i=index>
<ng-container *ngIf="user.categories.indexOf(cat.name)>=0">
{{cat.name}}{{cat.value}}
<ng-container>
</div>
NOTE: I'm in hurry, is possible that the code has syntax error, but I hope that the answer can help you a few