Skip to content

Instantly share code, notes, and snippets.

@kuntau
Created August 14, 2013 22:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kuntau/6236237 to your computer and use it in GitHub Desktop.
Save kuntau/6236237 to your computer and use it in GitHub Desktop.
app = angular.module("MyApp")
app.controller 'TodoCtrl', ($scope) ->
$scope.todos = [{text: 'learn angular', done: true},
{text: 'learn coffeescript', done: false}]
$scope.addTodo = ->
$scope.todos.push({text: $scope.todoText, done: false})
$scope.todoText = ''
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment