title: ng-option set default value in Angularjs
body: <p>I'm having trouble binding my default value to a <code>ng-option</code>. I already searched for the answer to my question but can't seem to find one.</p>
  
  <p>My problem is that I have 3 cascading <code>selects</code> with one model.</p>
  
  <p><strong>default values</strong></p>
  
  <pre><code>vm.roomData.branch = 'Lucena';
  vm.roomData.building = 'mhq';
  vm.roomData.roomFloor = '3rd Floor';
  </code></pre>
  
  <p><strong>html</strong></p>
  
  <pre><code>&lt;div class="col-md-4"&gt;
      &lt;label for="branch"&gt;
          &lt;strong&gt;Branch&lt;/strong&gt;
      &lt;/label&gt;
      &lt;select ng-options="loc as loc.branch for loc in vm.locations" class="form-control" ng-model="vm.roomData.branch"&gt;
      &lt;/select&gt;
      &lt;small id="emailHelp" class="form-text text-muted"&gt;Select branch.&lt;/small&gt;
  &lt;/div&gt;
  &lt;div class="col-md-4"&gt;
      &lt;label for="building"&gt;
          &lt;strong&gt;Building&lt;/strong&gt;
      &lt;/label&gt;
      &lt;select ng-options="loc as loc.name for loc in vm.roomData.branch.building" ng-model="vm.roomData.building" class="form-control"&gt;
      &lt;/select&gt;
  &lt;/div&gt;
  &lt;div class="col-md-4"&gt;
      &lt;label for="roomFloor"&gt;
          &lt;strong&gt;Room Floor&lt;/strong&gt;
      &lt;/label&gt;
      &lt;select ng-options="loc.floors as loc for loc in vm.roomData.building.floors" ng-model="vm.roomData.roomFloor" class="form-control"&gt;
      &lt;/select&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p></p>
  
  <p><strong>vm.locations data</strong></p>
  
  <pre><code>[
  {
      "_id": "5a681380b7c41e7df2076819",
      "branch": "Lucena",
      "__v": 0,
      "building": [
          {
              "name": "MHQ",
              "floors": [
                  "Ground Floor",
                  "2nd Floor",
                  "3rd Floor"
              ]
          }
      ],
      "dateCreated": "2018-01-24T05:02:56.465Z"
  },
  {
      "_id": "5a681aecb7c41e7df207681d",
      "branch": "Lucban",
      "__v": 0,
      "building": [
          {
              "name": "MHQ1",
              "floors": [
                  "ground floor",
                  "2nd floor"
              ]
          }
      ],
      "dateCreated": "2018-01-24T05:34:36.775Z"
  }]
  </code></pre>