From f99b8d57c2c1ea4efdacb625c21945d36a2feaab Mon Sep 17 00:00:00 2001 From: Thomas Wade Date: Sat, 6 Oct 2018 21:33:48 +0930 Subject: [PATCH] Add grammar check for 'mate' or 'mates' --- index.html | 2 +- scripts/app.js | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 8f8d55b..0f4dda5 100644 --- a/index.html +++ b/index.html @@ -20,7 +20,7 @@ {{mates}}
-
mates
+
{{matesText()}}
diff --git a/scripts/app.js b/scripts/app.js index c650e93..7d485bc 100644 --- a/scripts/app.js +++ b/scripts/app.js @@ -4,6 +4,11 @@ app.controller("mates", ["$scope", "$http", "$interval", function($scope, $http, { $scope.mates = 0; + $scope.matesText = function() + { + return $scope.mates == 1 ? "mate" : "mates"; + }; + $scope.animation = undefined; $scope.countdownStyle = {