From a292d8f17b42e2829f00a6ea4f5809566a525689 Mon Sep 17 00:00:00 2001 From: Xuefeng-Zhu Date: Mon, 11 Aug 2014 18:18:47 -0400 Subject: [PATCH] fix_empty_entry_issue --- public/js/controllers/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/js/controllers/main.js b/public/js/controllers/main.js index a399e2a96..7cb2ce277 100644 --- a/public/js/controllers/main.js +++ b/public/js/controllers/main.js @@ -17,11 +17,11 @@ angular.module('todoController', []) // CREATE ================================================================== // when submitting the add form, send the text to the node API $scope.createTodo = function() { - $scope.loading = true; // validate the formData to make sure that something is there // if form is empty, nothing will happen if ($scope.formData.text != undefined) { + $scope.loading = true; // call the create function from our service (returns a promise object) Todos.create($scope.formData)