Last active
August 29, 2015 14:00
-
-
Save aaronroberson/67edaf4cc2ed6530d62b to your computer and use it in GitHub Desktop.
AngularJS Modules Part 1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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