D3
OG
Old school D3 from simpler times
All examples
By author
By category
About
aaizemberg
Full window
Github gist
todo list en angularjs (con Gaba)
<!DOCTYPE html> <html> <body ng-app ng-controller="todoCtrl"> <h2>Todo list</h2> <form ng-submit="todoAdd()"> <input type="text" ng-model="todoInput" size="50" placeholder="Add New"> <input type="submit" value="Add New"> </form> <br> <div ng-repeat="x in todoList"> <input ng-change="remove(x)" type="checkbox" ng-model="x.done"><span ng-bind="x.todoText"></span> </div> <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.15/angular.min.js"></script> <script> function todoCtrl($scope) { $scope.todoList = [{todoText:'tutorial de AngularJS', done:false}, {todoText:'pintar la casa', done:false}]; $scope.todoAdd = function() { if ($scope.todoInput !== "") { $scope.todoList.push({todoText:$scope.todoInput, done:false}); } $scope.todoInput = ""; }; $scope.remove = function(item) { $scope.todoList.splice($scope.todoList.indexOf(item),1); }; } </script> </body> </html>
https://ajax.googleapis.com/ajax/libs/angularjs/1.2.15/angular.min.js