toddmotto / angularjs-styleguide

AngularJS styleguide for teams
https://ultimateangular.com
5.96k stars 700 forks source link

fix: get addTodo() and onSubmit() functions to expect "newTodo" property #64

Closed sryzycki closed 8 years ago

sryzycki commented 8 years ago

Let me know if I'm missing something...

Currently, addTodo({ todo }) expects an object with a todo property but in the onSubmit() function it provides an object with the newTodo property.

toddmotto commented 8 years ago

Ah yes! Sorry. Could you also change the lines underneath to use newTodo as well please dude?:

if (!todo) return;
this.todos.unshift(todo);
sryzycki commented 8 years ago

No problem! Force pushed.

Made them all to be "todo" property not to confuse people who learn ES2015 and come across all the this.newTodo stuff in the TodoController.

toddmotto commented 8 years ago

Awesome, saw the update - thanks so much!