title: Why element.addClass in directive doesn't work correctly?
body: <p>Element</p>
  
  <pre><code>&lt;button ud-listener="item.status"&gt;{{item.value}}&lt;/button&gt;
  </code></pre>
  
  <p>and I have the following directive</p>
  
  <pre><code>myApp.directive('myDirective', function()
  {
      return {
          restrict: 'A',
          link: function(scope, element, attrs)
          {
              scope.$watch(attrs.myDirective, function(val)
              {
                  if(!isUndefined(val))
                  {
                      element.addClass(val);
                      setTimeout(function(){
                          element.removeClass(val);
                      }, 2000);
                  }
              });
          }
      }
  });
  </code></pre>
  
  <p>What am I trying to do is:</p>
  
  <p>I am receiving json formated datas with socket-io and I am watching the myDirective which holds the value, which is required for add/-removeClass. </p>
  
  <p>At the beginning it works like a charm, the directive adds the class to the element and removes it after 2 sec. without any problem. But few min later it does not add the class to all elements only to few of them.</p>
  
  <p>Is there another way to do it? I only want to addClass to the element and removeClass after 2 seconds.</p>