我在IE 9/10上面臨奇怪的問題。雙向綁定適用於除了下拉菜單之外的所有html元素。 下拉列表中的值不會被選中。在Angular 2中的IE雙向下拉綁定問題
以下是示例代碼。
HTML
<select [(ngModel)]="model.city" id="city">
<option value="Lahore">Lahore</option>
<option value="Karachi">Karachi</option>
</select>
TS(Angular2)
this.model.city="Karachi";
雙向結合在IE上述條件不能工作。
我已經包含了IE所需的所有墊片,但仍然沒有被選中。
<script src="node_modules/es6-shim/es6-shim.min.js"></script>
<script src="node_modules/angular2/es6/dev/src/testing/shims_for_IE.js"></script>
<script src="node_modules/angular2/bundles/angular2-polyfills.js"></script>
鏈接的問題被標記爲已解決。但是在最新版本的Angular RC5上,IE仍然存在問題。 – Johannes