<body ng-app="submitExample">
<form ng-submit="submit()" ng-controller="ExampleController">
bir metin girin
<input type="text" ng-model="text" name="text" />
<input type="submit" id="submit" value="gönder" />
<pre>gönderdiğiniz metin={{list}}</pre>
</form>
</body>
angular.module('submitExample', [])
.controller('ExampleController', ['$scope', function($scope) {
$scope.list = [];
$scope.text = 'w3tr';
$scope.submit = function() {
if ($scope.text) {
$scope.list.push(this.text);
$scope.text = '';
}
};
}]);
This Pen doesn't use any external CSS resources.