title: AngularJS checkbox dynamic ng-true-value expression
body: <p>I'm trying to build a calculator for daycare prices in Angular.</p>
  
  <p>Every location in the company franchise has separate prices for every day. So my thinking was to build a form, with first a select that allows you to select the location, then a series of checkboxes for the days.</p>
  
  <p>I'm having trouble with ng-true-value in the checkboxes selecting the correct prices from my json file.</p>
  
  <p><strong>UPDATE:</strong> Added Plunkr: <a href="http://plnkr.co/edit/MDmrqaH1VzLBzjd5eHgT?p=preview" rel="noreferrer">http://plnkr.co/edit/MDmrqaH1VzLBzjd5eHgT?p=preview</a></p>
  
  <p>Consider this code:</p>
  
  <pre><code>        &lt;p class="kind_section"&gt;Choose location&lt;/p&gt;
          &lt;select ng-model="formData.location" ng-options="location.title for location in data.bso"&gt;&lt;/select&gt;
  
          &lt;p class="kind_section"&gt;Select days&lt;/p&gt;
  
          &lt;input type="checkbox" ng-model="location.day.mon" ng-change="calculatePrice()" ng-true-value="{{data.bso[formData.location.ID].prices.monday}}" ng-false-value="0"&gt;Ma
          &lt;input type="checkbox" ng-model="location.day.tue" ng-change="calculatePrice()" ng-true-value="{{data.bso[formData.location.ID].prices.tuesday}}" ng-false-value="0"&gt;Di&lt;br /&gt;
          &lt;input type="checkbox" ng-model="location.day.wed" ng-change="calculatePrice()" ng-true-value="{{data.bso[formData.location.ID].prices.wednesday}}" ng-false-value="0"&gt;Wo
          &lt;input type="checkbox" ng-model="location.day.thu" ng-change="calculatePrice()" ng-true-value="{{data.bso[formData.location.ID].prices.thursday}}" ng-false-value="0"&gt;Do&lt;br /&gt;
          &lt;input type="checkbox" ng-model="location.day.fri" ng-change="calculatePrice()" ng-true-value="{{data.bso[formData.location.ID].prices.friday}}" ng-false-value="0"&gt;Vr
  </code></pre>
  
  <p>First the select sets formData with a location ID, then I want to use this ID to select the day prices for the matching location and set those to ng-true-value. </p>
  
  <p>I'm using <code>ng-true-value="{{data.bso[formData.location.ID].prices.monday}}"</code> for this. This doesn't work.</p>
  
  <p>When I set the ID manually like <code>ng-true-value="{{data.bso[0].prices.monday}}"</code> it does work. Why is the result of the select not being picked up by ng-true-value?</p>
  
  <p>This is my json file:</p>
  
  <pre><code>  $scope.data = {
                  "bso": [
                    {
                      "ID": 0,
                      "title": "Locatie 1",
                      "prices": {
                          "monday": 130,
                          "tuesday": 130,
                          "wednesday": 200,
                          "thursday":130,
                          "friday": 130
                      }
                    },
                    {
                      "ID": 1,
                      "title": "Locatie 2",
                      "prices": {
                          "monday": 430,
                          "tuesday": 530,
                          "wednesday": 600,
                          "thursday":990,
                          "friday": 730
                      }
                    }
                  ]
                };
  </code></pre>