From f7d4fa3b2951cf0ce1cbe875db1a74697c34b635 Mon Sep 17 00:00:00 2001 From: julianmignogna Date: Thu, 12 Nov 2015 12:51:57 -0300 Subject: [PATCH 1/2] Update controller.js --- controller.js | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) 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; + } + + + +}]); From 22949cb2da10dc25013a0be8c73f5d48d6c9e900 Mon Sep 17 00:00:00 2001 From: julianmignogna Date: Thu, 12 Nov 2015 12:52:37 -0300 Subject: [PATCH 2/2] Update index.html --- index.html | 36 +++++++++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 9 deletions(-) diff --git a/index.html b/index.html index 4079a43..27deda3 100644 --- a/index.html +++ b/index.html @@ -9,25 +9,43 @@
- - + +
- - - + + +
- - + +
-
+
+
+

THE FULL LIST IS:

+
+ {{string}}
+
+
+
+

THE EVEN LIST IS:

+
+ {{string}}
+
+
+
+

THE ODD LIST IS:

+
+ {{string}}
+
+
- \ No newline at end of file +