<!DOCTYPE html>
<html ng-app="myApp">
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.8.3/angular.min.js"></script>
</head>
<body ng-controller="MyCtrl">
Name: <input ng-model="name" placeholder="Enter name"><br>
<p>Hello, {{name}}! Count: {{count}}</p>
<button ng-click="count++">Increase</button>
<script>
angular.module('myApp', [])
.controller('MyCtrl', function($scope){
$scope.name="";
$scope.count=0;
});
</script>
</body>
</html>
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter