摘要: bootstrap-switch和angularjs结合使用 由于angularjs的dom操作总是先执行,导致$(input[name="switch"])找不到元素,所以使用directive自定义指令,有两种方法: html部分: directive指令部分: 1、通过插入元素的方法 2、通过 阅读全文