title: Angular 4 model property
body: <p>In my angular 4 project I have a model like this:</p>
  
  <pre><code>export class DepositReceipt{
    euro1: number;
    euro2: number;
    euro5: number;
    euro10: number;
    euro20: number;
    euro50: number;
    euro100: number;
    euro200: number;
    euro500: number;
    totalAmount: number;
  }
  </code></pre>
  
  <p>The property totalAmount actually is the sum of other properties, is it possible to define in the model something like: <code>totalAmount = euro500 + euro200 +...</code> 
  Or if not possible how can I make it works?</p>
  
  <p>When I have response from the server I like this field will be calculated automatically because it's the sum of others.</p>