Search code examples
angularjstwitter-bootstrapngtable

How to make my button into a checkbox


I have ng-table with the hidden columns feature. It has a basic checkbox as the toggle. I designed it to look a little nicer but I cant get it to work.

plunkr

<div class="btn-group" data-toggle="buttons">
      <label class="btn btn-default active">
         <input type="checkbox" ng-model="column.visible"> <span class="glyphicon glyphicon-check"></span>
     </label>
</div>

Solution

  • It's because of Bootstrap's Button plugin.

    Are you using Bootstrap at all for this? I just removed Bootstrap's javascript file and it worked.

    If you need Bootstrap, you either need to make a custom build of it or remove the data-toggle="buttons" from your div and style it yourself.