我在我的应用程序中使用angular和bootstrap-switch插件。它的工作原理是这样的:自举开关和ng模型
<input type="checkbox" name="my-checkbox" checked>
<script>$("[name='my-checkbox']").bootstrapSwitch("size", "small");</script>
的问题是,如果我想使用所有我发现there属性这是行不通的。
如何在我的交换机上使用ng-model? 我想用这样的:
<input type="checkbox" name="my-checkbox" checked="variableStatus" data-on-color="success" data-off-color="warning">
or
<input type="checkbox" name="my-checkbox" ng-model="variableStatus" data-on-color="success" data-off-color="warning">