Skip to content

Instantly share code, notes, and snippets.

@TheunisKotze
Last active October 29, 2015 13:02
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 TheunisKotze/8ec107f93477fa960572 to your computer and use it in GitHub Desktop.
Save TheunisKotze/8ec107f93477fa960572 to your computer and use it in GitHub Desktop.
(angular.module "test", [])
.directive "test", [ () ->
restrict: "E"
templateUrl: "test.html"
replace: false
link: (scope, element, attrs) ->
scope.tests = [{name: "a"}, {name: "b"}]
scope.$watch "tests", ( ->
console.log "changes:", arguments), true
]
table
tr(ng-repeat="t in tests")
td {{t.name}}
td
input(ng-model="t.age")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment