Skip to content

Instantly share code, notes, and snippets.

@SFantasy
Created October 29, 2014 15:13
Show Gist options
  • Save SFantasy/f13daae2f0c4ed6d70cd to your computer and use it in GitHub Desktop.
Save SFantasy/f13daae2f0c4ed6d70cd to your computer and use it in GitHub Desktop.
Angular - Hello World!
<!DOCTYPE html>
<html>
<head>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.14/angular.min.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body ng-app>
<div ng-controller="HelloController">
<input type="text" ng-model="greeting.text">
<p>{{ greeting.text }}, world!</p>
</div>
<script>
function HelloController ($scope) {
$scope.greeting = { text: 'Hello' };
}
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment