code: function watchAttributes() {
        attr.$observe('value', function(value) {
          var percentValue = clamp(value);
          element.attr('aria-valuenow', percentValue);
  
          if (mode() != MODE_QUERY) animateIndicator(bar2, percentValue);
        });
  
        attr.$observe('mdBufferValue', function(value) {
          animateIndicator(bar1, clamp(value));
        });
  
        attr.$observe('disabled', function(value) {
          if (value === true || value === false) {
            isDisabled = !!value;
          } else {
            isDisabled = angular.isDefined(value);
          }
  
          element.toggleClass(DISABLED_CLASS, isDisabled);
          container.toggleClass(lastMode, !isDisabled);
        });
  
        attr.$observe('mdMode', function(mode) {
          if (lastMode) container.removeClass(lastMode);
  
          switch (mode) {
            case MODE_QUERY:
            case MODE_BUFFER:
            case MODE_DETERMINATE:
            case MODE_INDETERMINATE:
              container.addClass(lastMode = "md-mode-" + mode);
              break;
            default:
              container.addClass(lastMode = "md-mode-" + MODE_INDETERMINATE);
              break;
          }
        });
      }
docs: Watch the value, md-buffer-value, and md-mode attributes