title: Angularjs need ng-model update before ng-change
body: <p>I create customdirective and  want to ng-model update before ng-change fire. Currently ng-change fire before udpate ng-mdoel value below is my code. </p>
  
  <p><strong>Main issue is coming when i change page number in dropdown list. It alert with previous value. I think ng-mdoel update after ng-change fire. but i want ng-model fire before ng-change.</strong></p>
  
  <pre><code>app.directive('bottomPagination', function () {
      var directive = {
          templateUrl: '/App/Common/directives/bottomPagination.html',
          restrict: 'A',
          replace: true,
          scope: {
              currentPage: '=',
              changePageSize: '&amp;'
          }
      };
      return directive;
  });
  
  //here is html directive (/App/Common/directives/bottomPagination.html)
  
         &lt;select  id="pagesizeddl" ng-model="pageSize" ng-change="changePageSize()"&gt;
                              &lt;option&gt;5&lt;/option&gt;
                              &lt;option&gt;10&lt;/option&gt;
                              &lt;option&gt;20&lt;/option&gt;
                              &lt;option&gt;30&lt;/option&gt;
                          &lt;/select&gt;
  
  // here is my html page where i used directive
  
  
  &lt;div data-ng-controller="ProductsList as vm"&gt;
                  &lt;div data-bottom-pagination
                          data-page-size="vm.paging.pageSize"
                          data-change-page-size="vm.changePageSize()"
                           &gt;
                      &lt;/div&gt;
    &lt;/div&gt;
  
  // This is contrller
  (function () {
      // Start Products List function
      var ListControllerId = 'ProductsList';
      angular.module('app').controller(ListControllerId,
          ['$scope', ListController]);
  
      function ListController($scope) {
          var vm = this;
  
          vm.paging = {
              pageSize: 10
          }; 
  
          vm.changePageSize = changePageSize;
  
          function changePageSize() {
              alert(vm.paging.pageSize);
          }
      }
  })();
  </code></pre>