title: Angular input model conditionally reads from one property, writes to another
body: <p>I have a Person class where edits made to the person must be verified by an admin user.</p>
  
  <p>Each attribute has an "approved" and "tmp" version. Sometimes the "tmp" version is not set:</p>
  
  <pre><code>person = {first:'Bob', firstTmp:'Robert', last:'Dobbs', lastTmp:undefined}
  </code></pre>
  
  <p>When displaying the person, I want to display the "tmp" value if it is set, otherwise display the "approved" value. When writing, I want to write to the "tmp" value (unless logged in as an admin).</p>
  
  <p>Ideally, this would not require a lot of custom markup, nor writing cover methods for each property (there are around 100 of them). Something like this would be nice:</p>
  
  <pre><code>&lt;input ng-model="person.first" 
         tmp-model="person.firstTmp" 
         bypass-tmp="session.user.isAdmin" /&gt;
  </code></pre>
  
  <p>When displaying the value, display the tmp value if it is defined. Otherwise display the approved value.</p>
  
  <p>When writing the value, write to the tmp value, unless logged in as an admin. Admins write directly to the approved value.</p>
  
  <p>What's a good clean way to implement this in Angular? </p>
  
  <ul>
  <li>Extend NgModelController somehow?</li>
  <li>Use a filter/directive on the input?</li>
  <li>Cover methods?</li>
  <li>Just do the writing server-side?</li>
  </ul>