在一个角度模板,我使用吴-国家-选择软件包,使下降的ISO-3166国家代码。我看到的唯一问题是占位符文本没有按预期显示。
有关守则:
<div class="col-sm-6">
<div class="field-holder">
<country-select class="form-control"
cs-priorities="US,ES,GB,IT,CZ,DE,FR"
name="country" validate-on="dirty"
ng-model = "contact.country_code"
required-message="'Please select country.'"
placeholder="Country"
cs-required
required>
</country-select>
</div>
</div>知道我在这里错过了什么吗?
发布于 2016-07-18 15:49:43
看看我为这个问题创造的这个傻瓜。
输出

在链接的js文件angular-country-select.js (GIT源)行号#767中
更改这一行:
template: '<select ng-options="country.code as country.name for country in countries"> <option value="" ng-if="isSelectionOptional"></option> </select>',至
template: '<select ng-options="country.code as country.name for country in countries"> <option value="" disabled selected>Please select country</option><option value="" ng-if="isSelectionOptional"></option> </select>',https://stackoverflow.com/questions/38440530
复制相似问题