Hi, Im just starting with AngularJS and Im trying to create simple calc. I
made text area with ng-model atribute and few buttons and I want sum them
after clicking equal button. This is my poor code :
<html ng-app>
<body>
<div ng-controller = "countCtrl">
<input ng-model = "count">
<button ng-click = "count = count + 1">1 </button>
<button ng-click = "count = count + 2">2 </button>
<button ng-click = "count = count + '+'">+ </button>
<button ng-click = "equal"> = </button>
</div>
<script>
function countCtrl($scope){
$scope.count = " ";
}
</script>
</body>
</html>
Any ideas ? Thanks in advance for your help !
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.