title: Angular2 - [(ngModel)] With empty object
body: <p>I have a form with various inputs, options, and selects. The form is divided into various sections across several components. For example:</p>
  
  <pre><code>order.orderInfo.customerName
  order.orderInfo.address
  order.model.size
  order.model.options
  order.trims.selectedTrims
  </code></pre>
  
  <p>If <code>Order = {}</code> then it crashes with undefined errors. My first thought was to use the elvis operator, but Angular doesn't let you use it in an assignment. The only "solution" I've found so far is to not use the <code>[(ngModel)]</code> syntactic sugar at all and instead decompose everything to:</p>
  
  <pre><code>&lt;input [ngModel]="order?.orderInfo?.customer_mtm" (ngModelChange)="order.orderInfo.customer_mtm=$event" customer_mtm type="text"&gt;
  </code></pre>
  
  <p>Here's the thing, I <em>must</em> be doing something very wrong, because it doesn't make much sense to never ever be able to use the <code>[(ngModel)]</code> syntax, which is where I'm at now.</p>
  
  <p>Should I just change all my code to the <code>[ngModel]/(ngModelChange)</code> syntax, or should I did I get something conceptually wrong here?</p>