【发布时间】:2013-12-18 16:48:21
【问题描述】:
这是我尝试过的代码。我尝试使用 angularjs 代码和 html 代码添加占位符,但在这两种情况下都不起作用。请帮助我或建议我在这种情况下该怎么做
<select ui-select2="select2Options"
style="width:100%"
ng-model="SelectedProcessandIngredients"
data-placeholder="Select or Add Process/Ingredient"
ng-options="c.name group by c.status for c in colors"
ng-change="selectedinnerLoop()" >
</select>
Angular js 代码:
$scope.select2Options = {
placeholder : "Select or Add Process/Ingredient",
formatResult : processList,
formatSelection : processList,
escapeMarkup : function (m) {
return m;
}
};
【问题讨论】:
-
我认为它现在适用于最新版本。
标签: angularjs angularjs-select2