Skip to content

Instantly share code, notes, and snippets.

@ryanisinallofus
Created May 27, 2013 01:17
Show Gist options
  • Save ryanisinallofus/5654683 to your computer and use it in GitHub Desktop.
Save ryanisinallofus/5654683 to your computer and use it in GitHub Desktop.
DD.directive "add", () ->
(scope, element) ->
element.bind "click", ()->
scope.data.items.push {id: "newID", name: "New Item"}
scope.$apply()
return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment