<commit_before>angular.module('animateOnModelChange',[])
  .directive('animateOnModelChange', [function() {
    return {
      restrict: 'A',
      link: function (scope, element, attrs) {
        scope.$watch(attrs.animateOnModelChange, function(nv,ov){
          element
            .removeClass('change-animate')
            .addClass('change-animate');
          element.on('webkitAnimationEnd mozAnimationEnd animationend', function(e) {
            e.preventDefault();
            element.removeClass('change-animate');
          });
        });
      }
    };
  }]);<commit_msg>add watchModel to directive scope; change to watch watchModel instread of attrs<commit_after>angular.module('animateOnModelChange',[])
  .directive('animateOnModelChange', [function() {
    return {
      restrict: 'A',
      scope: {
        watchModel: "="
      },
      link: function (scope, element, attrs) {
        scope.$watch('watchModel', function(nv,ov){
          element
            .removeClass('change-animate')
            .addClass('change-animate');
          element.on('webkitAnimationEnd mozAnimationEnd animationend', function(e) {
            e.preventDefault();
            e.stopImmediatePropagation();
            element.removeClass('change-animate');
          });
        });
      }
    };
  }]);
{'fraction_non_alphanumeric': 0.1402439024390244, 'fraction_numerical': 0.0, 'mean_word_length': 2.43717277486911, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1333037', 'n_tokens_mistral': 351, 'n_tokens_neox': 348, 'n_words': 58}