Skip to content

Commit 53d773a

Browse files
committed
move plus button from remove completed
1 parent 384499c commit 53d773a

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

src/app/controllers/TodoController.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
});
2323

2424
function addTodo() {
25+
if (!vm.todoText) return;
2526
vm.todos.push({text: vm.todoText, done: false});
2627
vm.todoText = '';
2728
}

src/app/views/partials/checkboxes.html

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,15 @@ <h4 flex="82">{{vm.remaining()}} of {{vm.todos.length}} remaining</h4>
1010
</md-checkbox>
1111

1212
<form ng-submit="vm.addTodo($event)">
13-
<md-input-container>
14-
<label>Write some todo task here...</label>
15-
<input ng-model="vm.todoText">
16-
</md-input-container>
17-
<md-button class="md-fab md-warn" aria-label="Eat cake">
18-
<i class="material-icons">add</i>
19-
</md-button>
13+
<div layout="row" flex>
14+
<md-input-container flex>
15+
<label>Write some todo task here...</label>
16+
<input ng-model="vm.todoText">
17+
</md-input-container>
18+
<md-button class="md-fab md-wayrn md-mini">
19+
<i class="material-icons">add</i>
20+
</md-button>
21+
</div>
2022
<md-button class="md-primary" ng-click="vm.archive($event)">
2123
Remove completed
2224
</md-button>

0 commit comments

Comments
 (0)