title: AngularJs: How to Format Data in an Input?
body: <p><strong>Problem</strong></p>
  
  <p>I need to format an input field visually in order to help the user know what they should type as a phone number.  For example, I want to accept a phone number as being a 3 digit area code, 3 digit prefix and 4 digit suffix:  (207) 555-1212.  I want to:</p>
  
  <ol>
  <li>provide the helper formatting to the input field -- those parentheses and the hyphen</li>
  <li>I don't want the 'helper' characters to be included in the actual data I store in my model. </li>
  <li>As the user types, I want the parentheses to magically appear, then have the hyphen also appear at the right point.</li>
  </ol>
  
  <p>What's the best way to do it?</p>
  
  <p><em>Note</em>:  This is not for displaying of a number -- I could use a filter for that.  This is for formatting data within an <code>input</code> field.</p>
  
  <p>Thanks for your help!</p>