title: ui-typeahead - Working with object levels
body: <p>I have a person object:</p>
  
  <pre><code>person = {};
  
  person.city = {};
  
  person.city.state = {};
  </code></pre>
  
  <p><strong>First</strong> select the State</p>
  
  <pre><code>&lt;input type="text" class="form-control" ng-model="person.city.state" uib-typeahead="state as state.name for state in getState($viewValue)" &gt;
  </code></pre>
  
  <p><strong>After</strong> select the city based in <strong>state selected</strong></p>
  
  <pre><code>&lt;input type="text" class="form-control" ng-model="person.city" uib-typeahead="city as city.name for city in getCity($viewValue, person.city.state.id)" &gt;
  </code></pre>
  
  <p>Everything okay when i select the state, but the city input get value '[object Object]' after selected the state, if i clean the city input value to type the search, the state input clean too.
  any suggestion?</p>