typescript - 下拉列表角 11 的预输入功能
问题描述
我正在尝试将预先输入功能添加到我的 Angular 项目的下拉列表中。为此尝试使用 mat-autocomplete: html 代码如下:
<mat-form-field class="example-full-width">
<mat-select [(ngModel)]="sourceChosen" name="Source" (selectionChange)="sourceChange()">
<mat-autocomplete #auto="matAutocomplete">
<mat-option *ngFor="let l of sourceList" [value]="l">{{ l }}</mat-option>
</mat-autocomplete>
</mat-select>
</mat-form-field>
这没有用。知道怎么回事吗?另外,如果有人能建议一种更好的方法将提前输入功能添加到下拉列表中,我将不胜感激。TIA
解决方案
推荐阅读
- websocket - 当我打开一个 javascript alert() 大约 30 秒时,“Websocket 已经处于关闭或关闭状态”
- php - Laravel 本地化与路由资源参数混淆
- spring-batch - 如何在 SpringBatch 中使用 SimpleBinaryBufferedReaderFactory 以字节为单位读取数据
- r - 使用嵌套的 foreach 循环创建数据框列表
- java - Java Async HttpClient 请求似乎阻塞了主线程?
- javascript - jquery ajaxComplete 在 axios 中的等价物
- c++ - 面向对象编程问题:按值传递与按引用传递
- python - 将图像从 aws s3 存储桶加载到 django 应用程序
- reactjs - 一些用户在进行 React 部署时会遇到白屏,但苹果用户不会
- typescript - LSP4J:如何让语言服务器从客户端请求一些东西