I\'m a fish in AngularJS and I have this scenario.
submit
Please, surround your code with a ng-controller, and use ng-click on buttons out of scope of
I make a sample on jsfiddle for you... try it:
http://jsfiddle.net/xKkvj/2/
Enter text and hit enter: list={{list}} Submit 2
list={{list}}
with js:
function Ctrl($scope) { $scope.list = []; $scope.text = 'hello'; $scope.submit = function () { if ($scope.text) { $scope.list.push($scope.text); $scope.text = ''; } }; }