thoughts on angular todo list
Complaints about angular.js after playing around extensively with React and Meteor
I’m revisiting angular after not using it for a while. To get started again with my class @ RocketU we made a todo list. My code is here:
<div ng-app='TodoList' ng-controller='TodoCtrl as tc'>
First the markup seems real dirty. There are all sorts of extra the developer should be clued in about like
ng-keypress, passing in
$event. I like how I can attach
ng-model to the checkbox to make it automatically checked. I had trouble updating the data and the state of the checkbox using backbone. Angular’s two way data binding is for sure awesome.
We used the new
controller as syntx, which is less of a pain than I was expecting. As long as we use
var self we don’t run into any problems. I bet when Angular 2.0 and ES6 come out we won’t have to worry about the scope of this and whatnot. Looking forward to diving back into angular directives!
Soon I’ll also post a bit on how to build these simple apps. I like the declarative nature of react. It feels like a whole lot less magic. To infinity and beyond!