title: is it possible to add extra bind in already defined template in knockout.js?
body: <p>I have a component X template defined in ko.js like this</p>
  <pre class="lang-html prettyprint-override"><code>&lt;input class=&quot;input-text&quot; type=&quot;text&quot; data-bind=&quot;
      value: value,
      valueUpdate: 'keyup',
      hasFocus: focused,
      attr: {
          name: inputName,
          placeholder: placeholder,
          'aria-describedby': getDescriptionId(),
          'aria-required': required,
          'aria-invalid': error() ? true : 'false',
          id: uid,
          disabled: disabled
      }&quot;&gt;
  
  </code></pre>
  <p>I would like when another ko component's (Y) value is modified to add a class to the X component.</p>
  <p>Is it possible to do this without modifying the X component's template</p>
  <p>Normally I'd change the component template and add in data-bind the class attribute and then I could just do a</p>
  <p><code>component.class = ko.computed(function(){ //mylogic here }). </code></p>
  <p>Also is it possible to add a custom attribute like this without modifying the template to add the attr binding in data-bind ?</p>
  <p>For example to add a data-attribute = &quot;myvalue&quot; dynamically depending on the Y element's value again without modifying the template.</p>
  <p>Really new at knockout.js here.</p>