Skip to content

Commit

Permalink
fix_empty_entry_issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Xuefeng-Zhu committed Aug 11, 2014
1 parent b71ea37 commit a292d8f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion public/js/controllers/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit a292d8f

Please sign in to comment.