Skip to content

Instantly share code, notes, and snippets.

@drhanlau
Created June 11, 2016 03:36
Show Gist options
  • Save drhanlau/9815264edba833dd790f99eeab2ef2c1 to your computer and use it in GitHub Desktop.
Save drhanlau/9815264edba833dd790f99eeab2ef2c1 to your computer and use it in GitHub Desktop.
(function(){
angular.module('formApp', []);
}());
(function(){
angular.module('formApp')
.controller('MyController1', MyController1);
function MyController1($scope) {
$scope.testMessage = 'Hello World!';
}
}());
<!DOCTYPE html>
<html ng-app="formApp">
<head lang="en">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>ng-form-validations</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap-theme.min.css">
<style>
/* Custom styles here */
body {
padding-top: 75px;
padding-bottom: 40px;
background-color: #eee;
}
</style>
</head>
<body>
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" href="#/">ng-form-validations</a>
</div>
<div class="collapse navbar-collapse">
<ul class="nav navbar-nav navbar-right">
<li><a href="#/">Home</a></li>
</ul>
</div>
</div>
</nav>
<div class="container">
<div class="row">
<div class="col-xs-10 col-xs-offset-1">
<div class="panel panel-default">
<div class="panel-heading">Task 1: Getting Started</div>
<div class="panel-body">
<div ng-controller="MyController1">
{{ testMessage }}
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Insert Angular scripts here -->
<script src="https://code.angularjs.org/1.4.9/angular.min.js"></script>
<script src="js/app.js"></script>
<script src="js/controllers.js"></script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment