我对使用 mat-autocomplete 材料设计的示例有疑问。谷歌提供的示例函数在构建中给出了错误,如图所示。
this.filteredOptions = this.myControl.valueChanges
.pipe(
startWith(''),
map(value => typeof value === 'string' ? value : value.name),
map(name => name ? this._filter(name) : this.options.slice())
);

