THE FULL LIST IS:
++
THE EVEN LIST IS:
++
THE ODD LIST IS:
++
diff --git a/controller.js b/controller.js index 9354734..c287562 100644 --- a/controller.js +++ b/controller.js @@ -1,4 +1,36 @@ angular.module('test', []) .controller('testController', ['$scope', function($scope) { -}]); \ No newline at end of file + $scope.show_full = 1; + $scope.show_even = 0; + $scope.show_odd = 0; + $scope.list_array = []; + + $scope.showAllNumbers = function(){ + $scope.list_array = []; + $scope.show_full = 1; + $scope.show_even = 0; + $scope.show_odd = 0; + for (i = $scope.min_number; i <= $scope.max_number; i++) { + $scope.list_array.push (i); + } + + } + + $scope.showOddNumbers = function(){ + $scope.showAllNumbers(); + $scope.show_odd = 1; + $scope.show_full = 0; + $scope.show_even = 0; + } + + $scope.showEvenNumbers = function(){ + $scope.showAllNumbers(); + $scope.show_full = 0; + $scope.show_even = 1; + $scope.show_odd = 0; + } + + + +}]); diff --git a/index.html b/index.html index 4079a43..27deda3 100644 --- a/index.html +++ b/index.html @@ -9,25 +9,43 @@