Skip to content

Commit a292d8f

Browse files
committed
fix_empty_entry_issue
1 parent b71ea37 commit a292d8f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

public/js/controllers/main.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ angular.module('todoController', [])
1717
// CREATE ==================================================================
1818
// when submitting the add form, send the text to the node API
1919
$scope.createTodo = function() {
20-
$scope.loading = true;
2120

2221
// validate the formData to make sure that something is there
2322
// if form is empty, nothing will happen
2423
if ($scope.formData.text != undefined) {
24+
$scope.loading = true;
2525

2626
// call the create function from our service (returns a promise object)
2727
Todos.create($scope.formData)

0 commit comments

Comments
 (0)