Skip to content

Instantly share code, notes, and snippets.

@hgbrown
Created February 28, 2013 04:26
Show Gist options
  • Save hgbrown/5054178 to your computer and use it in GitHub Desktop.
Save hgbrown/5054178 to your computer and use it in GitHub Desktop.
ANGULARJS: Hello World Example
<!DOCTYPE html>
<html ng-app>
<head>
<title>Welcome to AngularJS</title>
<script src='http://ajax.googleapis.com/ajax/libs/angularjs/1.0.3/angular.js'></script>
<script>
function Clock($scope) {
$scope.currentTime = new Date();
}
</script>
</head>
<body>
<h1>Hello, World.</h1>
<p ng-controller='Clock'>
The current time is {{currentTime | date:'h:mm:ss a'}}.
<p>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment