【发布时间】:2020-01-02 16:17:18
【问题描述】:
我在 Angular 4 项目中使用 jQuery select2,每当我尝试更改 select2 值时,尊重的函数都不会调用
HTML
<label> Parent SKU</label>
<select id="parent_sku" formControlName="parent_sku" class="form-control" [ngClass]="{ 'is-invalid': submitted && f.parent_sku.errors, 'disabled' : isDesginer }" (change)="selectParentSku()">
<option *ngFor="let product of allProductsList | orderBy: 'modified_at': false " value="{{product.sku}}">{{product.sku}} : {{product.product_name}}
</option>
</select>
打字稿
selectParentSku() {
console.log('hi');
}
【问题讨论】:
标签: angular typescript jquery-select2