这是我尝试过的代码。我试图用angularjs代码和html代码添加占位符,但它不适用于这两种情况。请帮助我,或建议我怎么在这种情况下做占位符未在angularjs中选择select2
<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>
角JS代码:
$scope.select2Options = {
placeholder : "Select or Add Process/Ingredient",
formatResult : processList,
formatSelection : processList,
escapeMarkup : function (m) {
return m;
}
};
我认为它适用于最新版本。 – maxisam
谢谢maxisam。 –