Commit 17d9e588be9a3af001740be8b8b034759e0cd07c

Authored by Andrew Buss
1 parent e9700ca03a

one more byte

Showing 2 changed files with 1 additions and 4 deletions Inline Diff

controller.js View file @ 17d9e58
var app = angular.module('flashy', []); 1 1 var app = angular.module('flashy', []);
2 2
3 3
app.controller("HomeController", ['$scope', '$state', function ($scope, $state) { 4 4 app.controller("HomeController", ['$scope', '$state', function ($scope, $state) {
5 5
// SIGN UP 6 6 // SIGN UP
$scope.signUp = function (email, username, password) { 7 7 $scope.signUp = function (email, username, password) {
8 8
9 9
// make server call 10 10 // make server call
console.log("go to dashboard"); 11 11 console.log("go to dashboard");
12 12
// if successful, go to dashboard 13 13 // if successful, go to dashboard
$state.go('dashboard'); 14 14 $state.go('dashboard');
15 15
}; 16 16 };
17 17
18 18
// LOGIN 19 19 // LOGIN
<!DOCTYPE html> 1 1 <!DOCTYPE html>
<html ng-app="flashy"> 2 2 <html ng-app="flashy">
<base href="app/"> 3 3 <base href="/app/">
<header> 4 4 <header>
5 5
<link rel = "stylesheet" href ="styles/bootstrap-3.3.4-dist/css/bootstrap.css" /> 6 6 <link rel = "stylesheet" href ="styles/bootstrap-3.3.4-dist/css/bootstrap.css" />
<link rel ="stylesheet" href="flashy.css" /> 7 7 <link rel ="stylesheet" href="flashy.css" />
8 8
</header> 9 9 </header>
<body ng-controller="HomeController"> 10 10 <body ng-controller="HomeController">
11 11
<!-- MENU BAR --> 12 12 <!-- MENU BAR -->
<nav class="navbar navbar-default"> 13 13 <nav class="navbar navbar-default">
<div class="container-fluid"> 14 14 <div class="container-fluid">
<b>Flashy</b> 15 15 <b>Flashy</b>
</div> 16 16 </div>
</nav> 17 17 </nav>
18 18
19 19
<h2>Create and share flashcards in real time!</h2> 20 20 <h2>Create and share flashcards in real time!</h2>
21 21
<!-- REGISTRATION TABS --> 22 22 <!-- REGISTRATION TABS -->
<div class="tabbable"> 23 23 <div class="tabbable">
<ul class="nav nav-tabs"> 24 24 <ul class="nav nav-tabs">
<li role="presentation" class="active"><a href="#tab1" data-toggle="tab">SIGN UP</a></li> 25 25 <li role="presentation" class="active"><a href="#tab1" data-toggle="tab">SIGN UP</a></li>
<li role="presentation"><a href="#tab2" data-toggle="tab">LOGIN</a></li> 26 26 <li role="presentation"><a href="#tab2" data-toggle="tab">LOGIN</a></li>
</ul> 27 27 </ul>
</div> 28 28 </div>
29 29
<!-- REGISTRATION TAB PANES --> 30 30 <!-- REGISTRATION TAB PANES -->
<div class="tab-content"> 31 31 <div class="tab-content">
32 32
<!-- SIGN UP FORM --> 33 33 <!-- SIGN UP FORM -->
<div class="tab-pane active" id="tab1"> 34 34 <div class="tab-pane active" id="tab1">
<form> 35 35 <form>
<div class="form-group"> 36 36 <div class="form-group">
<input type="email" class="form-control" ng-model="signUpEmail" placeholder="Email" /> 37 37 <input type="email" class="form-control" ng-model="signUpEmail" placeholder="Email" />
</div> 38 38 </div>
39 39
<div class="form-group"> 40 40 <div class="form-group">
<input type="text" class="form-control" ng-model="signUpUsername" placeholder="Username" /> 41 41 <input type="text" class="form-control" ng-model="signUpUsername" placeholder="Username" />
</div> 42 42 </div>
43 43
<div class="form-group"> 44 44 <div class="form-group">
<input type="password" class="form-control" ng-model="signUpPassword" placeholder="Password" /> 45 45 <input type="password" class="form-control" ng-model="signUpPassword" placeholder="Password" />
</div> 46 46 </div>
<input type="submit" class="btn btn-primary" ng-click="signUp(signUpEmail, signUpUsername, signUpPassword)" value="GET STARTED!" /> 47 47 <input type="submit" class="btn btn-primary" ng-click="signUp(signUpEmail, signUpUsername, signUpPassword)" value="GET STARTED!" />
</form> 48 48 </form>
</div> 49 49 </div>
50 50
<!-- LOGIN FORM --> 51 51 <!-- LOGIN FORM -->
<div class="tab-pane" id="tab2"> 52 52 <div class="tab-pane" id="tab2">
53 53
<form> 54 54 <form>
<div class="form-group"> 55 55 <div class="form-group">
<input type="email" class="form-control" ng-model="loginEmailOrUsername" placeholder="Email or username" /> 56 56 <input type="email" class="form-control" ng-model="loginEmailOrUsername" placeholder="Email or username" />
</div> 57 57 </div>
<div class="form-group"> 58 58 <div class="form-group">
<input type="password" class="form-control" ng-model="loginPassword" placeholder="Password" /> 59 59 <input type="password" class="form-control" ng-model="loginPassword" placeholder="Password" />
</div> 60 60 </div>
<input type="submit" class="btn btn-primary" ng-click="login(loginEmailOrUsername, loginPassword)" value="LOGIN" /> 61 61 <input type="submit" class="btn btn-primary" ng-click="login(loginEmailOrUsername, loginPassword)" value="LOGIN" />