title: Accessing Object properties, from HTML Select.
body: <p><strong>Scenario:</strong>
  I am trying to access a property (code) of a ng-Model object (myRide).</p>
  
  <ol>
  <li><p>I've tried doing this by </p>
  
  <pre><code>&lt;select ng-model = "myRide" 
    ng-change = "getCode(myRide.code)"&gt; 
  </code></pre>
  
  <p>...and at getCode, </p>
  
  <p><code>alert(parameter) //which should be myRide.code.</code></p></li>
  <li><p>I've also tried to do this by</p>
  
  <pre><code>&lt;select ng-model = "myRide" 
    ng-change = getCode(myRide)
  </code></pre>
  
  <p>(Note: 'myRide' is passed, not 'myRide.code') ...and at getCode, </p>
  
  <p><code>alert(myRide.code).</code></p></li>
  </ol>
  
  <p>myRide does indeed contain a property called 'code', which is not undefined. </p>
  
  <p><strong>Problem:</strong> Both tries do not produce the wanted outcome. </p>
  
  <hr>
  
  <p><strong>How can I make it display the property (code)?</strong></p>
  
  <p>Here is the JSFiddle: <a href="http://jsfiddle.net/a2J6z/1/" rel="nofollow">http://jsfiddle.net/a2J6z/1/</a></p>