[fix] The page variable is stored in $scope

The page variable is stored in $scope not as a local variable.