This commit is contained in:
Tommy Parnell
2016-10-08 09:22:13 -04:00
commit 02e6c893f5
4 changed files with 39 additions and 0 deletions

0
README.md Normal file
View File

16
index.html Normal file
View File

@@ -0,0 +1,16 @@
<!DOCTYPE html>
<html ng-app="awesome">
<head>
<script data-require="angular.js@*" data-semver="1.5.8" src="https://code.angularjs.org/1.5.8/angular.js"></script>
<link rel="stylesheet" href="style.css" />
<script src="script.js"></script>
</head>
<body ng-controller="awesome">
<h1>Hi! my name is {{ username }}</h1>
<input type="text" ng-model="username" />
<input type="button" ng-click="runMe()" value="go dawg" />
</body>
</html>

21
script.js Normal file
View File

@@ -0,0 +1,21 @@
// Code goes here
(function(){
var app = angular.module('awesome', []);
var mainController = function($scope){
if(!$scope.username){
$scope.username = "defaults brah";
}
$scope.runMe = function(){
alert($scope.username);
}
};
app.controller('awesome', mainController);
})();

2
style.css Normal file
View File

@@ -0,0 +1,2 @@
/* Styles go here */