Skip to content

Instantly share code, notes, and snippets.

@aaronroberson
Last active August 29, 2015 14:03
Show Gist options
  • Select an option

  • Save aaronroberson/c1b0edcf57916813dbe2 to your computer and use it in GitHub Desktop.

Select an option

Save aaronroberson/c1b0edcf57916813dbe2 to your computer and use it in GitHub Desktop.
Geekwise2 Day 2
<!doctype html>
<html ng-app>
<head lang="en">
<meta charset="UTF-8">
<title></title>
</head>
<body>
<div>
<label>Name:</label>
<input type="text" ng-model="user.name" placeholder="Enter a name here">
<h1>Hello {{user.name}}!</h1>
</div>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.0-beta.13/angular.min.js"></script>
</body>
</html>
<!doctype html>
<html ng-app>
<head lang="en">
<meta charset="UTF-8">
<title></title>
</head>
<body ng-controller="myController">
<h1>Hello {{user.fullName}}!</h1>
<script type="text/javascript">
function myController($scope) {
$scope.user = {
firstName: 'Aaron',
lastName: 'Roberson',
fullName: this.firstName + ' ' this.lastName
};
}
</script>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.0-beta.13/angular.min.js"></script>
</body>
</html>
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
</head>
<body>
</body>
</html>
<!doctype html>
<html ng-app="myModule">
<head>
</head>
<body>
<div>
<label>Name:</label>
<input type="text" ng-model="name" placeholder="Enter a name here">
<hr>
<h1>Hello {{name}}!</h1>
</div>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.0-beta.13/angular.min.js"></script>
<script>
// Initialize the module
// The square brackets is an array of
// dependency names that angular's
// dependency injection system uses
// to compose modules of other modules
angular.module('myModule', []);
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment