1
我有这样一个列表项)
<label class="item item-select item-button-left">
<button class="button button-positive" ng-click="something()" >
<i class="icon ion-android-add-circle" ></i>
</button>
<label>My Label</label>
<select>
<option ng-repeat="x in xs" value="{{ x.id }}">{{ x.name }}</option>
</select>
</label>
每当我按一下按钮,东西(被称为但是东西当我点击任何东西(标签或下拉列表)时被调用。和下拉不起作用。
此外,html结构可能不正确。我的要求是如果在下拉菜单中没有需要的项目,请“添加”一个新项目。我知道我们可以添加“添加新的”作为select的第一个元素,当我们点击它时,它会让我添加(使用ng-change函数)。但我觉得拥有+图标要好得多。你说什么 ?
感谢您的回答+1。 – user1305989