如何在 AngularJS 和 jQuery Mobile 中使用翻转切换开关?
以下代码段包含一个不被 angular 选中的翻转切换开关和一个被 angular 检查的注释复选框:
<div data-role="content">
<ul id="pumps" data-role="listview">
<li ng-repeat="pump in fleetManager.pumps"
ngm-click="fleetManager.toggleBuzzer(pump)"><span>{{pump.sn}}</span>
<span>
<!-- FIXME: does not select the marked option -->
<select data-role="slider">
<option value="silent">Silent</option>
<option value="beeping" ng-selected="pump.status!=0">Beeping</option>
</select>
<!-- NOTE: this one works as expected -->
<!--input type="checkbox" ng-checked="pump.status!=0"-->
</span></li>
</ul>
</div>