Disable checkbox (material light) checking

Viewed 912

In my app i'm using Google Material Light library.

And i do not wanna check my input (until some logic is right), that's why i added such directive:

app.directive('updLink', function () {
    return {
      restrict: 'EA',
        link: function(scope, element) {
          element.bind('click', function(evt) {
            evt = evt || window.event;
            evt.preventDefault();
            evt.stopPropagation();
            evt.returnValue = false;
            return false;
          });
        }
      };
  });

and my html:

  <label class="mdl-checkbox mdl-js-checkbox mdl-js-ripple-effect" for="123">
      <input type="checkbox" id="123" class="mdl-checkbox__input"  ng-model="user" upd-link>
  </label>

why prevent this directive isn't working in IE10+?

checkbox is checking(

and value is changing...

is it possible to stop any changes and checking on this element?

plunker: https://plnkr.co/edit/CCQaBOntmQ4eWh0RUJ5Q?p=preview

2 Answers
Related