这样的标题,任何人都可以帮助我吗?这是我的代码html
<select id="SelectTemplate">
<option hidden disabled value>View available templates</option>
<option *ngFor="let email of observableEmail | async">{{email.name}}</option>
</select>
答案 0 :(得分:0)
您很接近,请参考Angular文档以获取示例,您可以尝试: (“ yourFunc”表示您的打字稿方法名称)
<select id="SelectTemplate" (change) = "yourFunc($event.target.value)">
<option hidden disabled value>View available templates</option>
<option *ngFor="let email of observableEmail | async" [value]="email">{{email.name}}</option>
</select>