title: What is the AngularJS way to show or hide a form element?
body: <p>This question was asked on the Mailing List by Tami Wright...</p>
  
  <p>I'm moving into the AngularJS world from JQuery and am not quite sure how to translate a particular use case which is a no brainer in JQuery.  That use case is enabling/disabling or hiding/showing form elements based on the change of a select element in the same form.  Any ideas/suggestions/pointers anyone would be willing to share to help me get this working?</p>
  
  <p>And for an idea of what I'm trying to do here is some code to illustrate:</p>
  
  <pre><code>$('#ddl').change( function (e) {
                  var selectedValue = $(this).val();
                  switch(selectedValue){
                      case 1:
                           // Hide/show or enable/disable form elements here with Javascript or Jquery
  
  // Sample enable code 
              document.getElementById("username").readOnly = false;
              document.getElementById("username").style.background = "transparent";
              document.getElementById("username").style.color = "#000000"; 
  
  
  // Sample disable code 
              document.getElementById("first_name").readOnly = true;
              document.getElementById("first_name").style.color = "#c0c0c0"; 
                                      break;          
                  }
                  return false;
              });
  </code></pre>
  
  <p>Thank you in advance,</p>
  
  <p>Tami Wright </p>