<!DOCTYPE html>
<html ng-app="myApp">
<head>
<meta charset="UTF-8">
<title>AngularJS Example</title>
</head>
<body ng-controller="myCtrl">
<h1>Hello !</h1>
<p ng-repeat="item in items"></p>
<input type="text" ng-model="name">
<button ng-click="addItem()">Add Item</button>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.8.2/angular.min.js"></script>
<script>
var app = angular.module("myApp", []);
app.controller("myCtrl", function($scope) {
$scope.name = "World";
$scope.items = ["Item 1", "Item 2", "Item 3"];
$scope.addItem = function() {
$scope.items.push("New Item");
};
});
</script>
</body>
</html>