javascript - How to make angular child scopes refresh? -


i have template:

<div class="oss-object cp-def cp-row" ng-repeat="(key, value) in data" ng-init="viewables = getviewables(value.versions[0].objectinfo);">         <div class="cp-def">             {{value.info.name}} ossstatus: {{value.versions[0].objectinfo.status}}             , 3d-viewables:                 <select ng-change="viewableselected(value.versions[0].urn, viewables, '3d')" ng-model="viewables.selected3d" ng-options="viewable viewable.name viewable in viewables['3d']">                     <option value="">---please select---</option>                 </select>             , 2d-viewables:                 <select ng-change="viewableselected(value.versions[0].urn, viewables, '2d')" ng-model="viewables.selected2d" ng-options="viewable viewable.name viewable in viewables['2d']">                     <option value="">---please select---</option>                 </select>         </div>     </div> 

and when data gets updated (the data property used in top ng-repeat) in controller new data set, doesn't automatically refresh child scopes in ng-options. derived data set. know how refresh child scopes? have tried calling $apply , $digest no success.

as said in comments, try replace viewables['3d'] in ng-options getviewables(value, '3d') , have controller return array.


Comments

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

java - Android – MapFragment overlay button shadow, just like MyLocation button -