title: Disallow unchecking of all checkboxes in angularJS
body: <p>I'm using AngularJS directive for list of checkboxes <a href="https://github.com/vitalets/checklist-model" rel="nofollow">checklist-model</a> but I need to keep at least one check box checked at all times.
  I've changed the <a href="https://rawgit.com/ozba/97f98bbfee283622ccc9/raw/80d3371de0ea5bfedc3e4a39fde2e78fe6c01122/checklist-model.js" rel="nofollow">checklist-model.js</a> by adding an if:</p>
  
  <pre><code>watch if(current.length &gt; 1)
  </code></pre>
  
  <p>before removing a check:</p>
  
  <pre><code>scope.$watch(attrs.ngModel, function(newValue, oldValue) {
    if (newValue === oldValue) { 
      return;
    } 
    var current = getter(scope.$parent);
    if (angular.isFunction(setter)) {
      if (newValue === true) {
        setter(scope.$parent, add(current, value, comparator));
      } else {
          if(current.length &gt; 1)
          {
              setter(scope.$parent, remove(current, value, comparator));
          }
      }
    }
  
    if (checklistChange) {
      checklistChange(scope);
    }
  });
  </code></pre>
  
  <p>The problem is that the UI has already changed to unchecked while the model did not change.</p>
  
  <p>Anyone has an elegant suggestion (preferably without JQuery) on how to change the checkbox back to "checked" state, or even better to catch it before it changed to checked?</p>
  
  <p>JSfiddle <a href="http://jsfiddle.net/Ebv3p/642/" rel="nofollow">here</a>, try to uncheck all and see that when the check boxes are all unchecked (what I'm trying to prevent) the model stays not empty (which is good but not enough)</p>