<html lang="en" ng-app="app">
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.3/angular.min.js"></script>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Bootstrap 101 Template</title>
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">
<div ng-controller="MainCtrl as ctrl">
<form ng-submit="ctrl.submit()" name="myForm">
ng-model="ctrl.user.username"
ng-pattern="/^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/"
ng-model="ctrl.user.password"
ng-disabled="myForm.$invalid">
<script type="text/javascript">
.controller('MainCtrl', [function () {
self.submit = function () {
// Create user object to send to the server
alert(self.user.username);
console.log('First form submit with ', self.user);