After updating the Angular version in my project, I encountered this issue:
The error message 'The type 'string' is not assignable to type 'ReportTeamFilter[]'' pops up.
This problem arises when I try to assign a value to searchOptions.BusinessLst using this.business.value;
business = new FormControl('');
var searchOptions: DelegateSearch = new DelegateSearch();
searchOptions.BusinessLst = this.business.value;
delegate.ts
import { ReportingFilter }
export class DelegateSearch {
public BusinessLst: ReportingTeamFilter[];
constructor() {}
}
reporting-model.ts
export class ReportingTeamFilter {
public Id: number;
public Name: string;
public Date: Date;
constructor(){}
}
Does anyone have any suggestions on how to resolve this issue?
Appreciate any help. Thank you