Reputation: 4439
took this from the AngularJS tutorial egghead.io, it never seems to hit the logchore function:
app.controller("ChoreCtrl", function($scope) {
$scope.logChore = function() {
alert("is done");
}
})
jsfiddle: http://jsfiddle.net/dingen2010/sFnAr/1/
Upvotes: 0
Views: 46
Reputation: 17556
Just replace ngclick="done()" to ng-click="done()"
template: '<input type="text" ng-model="chore">' + ' {{chore}}' + ' <div class="button" ng-click="done()">i m done</div>'
taken from the fiddle
Upvotes: 2