Skip to content

Instantly share code, notes, and snippets.

@jdx
Last active October 15, 2015 21:08
Show Gist options
  • Save jdx/e7ad56af29880dac8cea to your computer and use it in GitHub Desktop.
Save jdx/e7ad56af29880dac8cea to your computer and use it in GitHub Desktop.
'use strict';
angular.module('app', []);
angular.module('app')
.controller('TodoCtrl', function ($scope) {
$scope.todos = [{title: 'Get paper'}, {title: 'Mail rent check'}];
$scope.addTodo = function () {
$scope.todos.push($scope.newTodo);
$scope.newTodo = {};
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment