>
> I have updated the code...Check this..
> HTML:
> {{pageSize}}
> <select name="pageSize" id="pageSize" ng-model="pageSize"
> ng-change=*"update(pageSize);"*>
> <option value="5">5</option>
> <option value="10">10</option>
> <option value="25">25</option>
> <option value="50">50</option>
> </select>
>
> Controller:
> $scope.pageSize = 5;
>
> $scope.update = function(pageSize) {
>
$scope.pageSize = pageSize;
> console.log("pageSize = "+$scope.pageSize);
> reviewService.fetch({
> pageSize: $scope.pageSize,
> }).success(function(data, status) {
> console.log("success!");
> $scope.reviewData = data.d;
> $scope.nrOfPages =
> Math.ceil($scope.reviewData.summary.ReviewCount / $scope.pageSize);
> }).error(function(data, status) {
> console.log("error!");
> $scope.error = true;
> });
> }
> $scope.update();
>
> So to be clear:
> * $scope.update() gets called correctly by ng-change.
> * the log($scope.pageSize) always logs '5'.
> * {{pageSize}} shows the value I selected.
>
>
> mcv.
>
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.