Angular - Ionic:使 select 下拉菜单看起来像文本 link

Angular - Ionic: Make select dropdown look like a text link

所以我想让 select 标签下拉菜单看起来像一个普通的文本 link,但是当点击它时它仍然激活 ionics select(移动下拉菜单)功能。 (http://ionicframework.com/docs/components/#select)

下面的这个插件显示了我不想要的下拉框的外观。谁能帮我把下拉框变成文本 link 拜托!

  <select ng-model="myColor" ng-options="color.name for color in colors"></select>

https://plnkr.co/edit/A9ycYBKC1GUDhpCiskr5?p=preview

将以下内容添加到您的 plunker 作品中:

<style>
    select{
        -webkit-appearance:none;
        outline: none;
        border: none;
        background: none;
        color: blue;
        text-decoration: underline;
    }
</style>

一种可能性是完全删除 select 并使用无序列表模拟它。 Example.

  <a href="" ng-init="show = true" ng-click="show = !show">Link</a>
  <ul ng-if="show">
  <li ng-repeat="color in colors">
    <a href="" ng-click="setColor(color)">{{color.name}}</a>
  </li>
  </ul>