title: AngularJS orderBy - how to reflect in parent scope?
body: <p>How to reflect orderby in parent scope? Also I already tried to use prototype inheritance without success using sortorder.val as ng-model. An help?</p>
  
  <pre><code>&lt;body ng-controller="parentCtrl"&gt;
     &lt;table style="width:300px"&gt;
        &lt;tr&gt;
          &lt;td&gt;Name&lt;/td&gt;
          &lt;td&gt;Age&lt;/td&gt;      
        &lt;/tr&gt;
        &lt;tr ng-repeat="contact in contacts | orderBy:sortorder"&gt;
          &lt;td&gt;{{contact.name}}&lt;/td&gt;     
          &lt;td&gt;{{contact.age}}&lt;/td&gt;
        &lt;/tr&gt;
    &lt;/table&gt; 
    &lt;br/&gt;
  &lt;div ng-controller="childCtrl"&gt;
    Order By:
    &lt;select ng-model="sortorder"&gt;
        &lt;option selected value="name"&gt;Name&lt;/option&gt;
        &lt;option value="age"&gt;Age&lt;/option&gt;
    &lt;/select&gt;
  &lt;/div&gt;  
  &lt;/body&gt;
  
  var app = angular.module('plunker', []);
  app.controller('parentCtrl', ['$scope', function ($scope) {
  $scope.sortorder = ['name'];
  $scope.contacts = [
      {name: 'Alfred', age: 37},
      {name: 'Allan', age: 21},
      {name: 'Dimmi', age: 17},
      {name: 'Berta', age: 65},
      {name: 'Chris', age: 25},
      {name: 'Dora', age: 12}
  ];
  app.controller('chilCtrl', function($scope) {
  
  });
  }]);
  </code></pre>
  
  <p>Plunk: <a href="http://plnkr.co/edit/bXGyund8v78Tal7lZ76O?p=preview" rel="nofollow">http://plnkr.co/edit/bXGyund8v78Tal7lZ76O?p=preview</a></p>