-
Notifications
You must be signed in to change notification settings - Fork 217
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
94a6c1e
commit 03f1564
Showing
15 changed files
with
210 additions
and
61 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
(function () { | ||
|
||
angular | ||
.module('meanApp') | ||
.controller('loginCtrl', loginCtrl); | ||
|
||
loginCtrl.$inject = ['$location']; | ||
function loginCtrl($location) { | ||
var vm = this; | ||
|
||
// vm.pageHeader = { | ||
// title: 'Sign in to Loc8r' | ||
// }; | ||
|
||
// vm.credentials = { | ||
// email : "", | ||
// password : "" | ||
// }; | ||
|
||
// vm.returnPage = $location.search().page || '/'; | ||
|
||
// vm.onSubmit = function () { | ||
// vm.formError = ""; | ||
// if (!vm.credentials.email || !vm.credentials.password) { | ||
// vm.formError = "All fields required, please try again"; | ||
// return false; | ||
// } else { | ||
// vm.doLogin(); | ||
// } | ||
// }; | ||
|
||
// vm.doLogin = function() { | ||
// vm.formError = ""; | ||
// authentication | ||
// .login(vm.credentials) | ||
// .error(function(err){ | ||
// vm.formError = err; | ||
// }) | ||
// .then(function(){ | ||
// $location.search('page', null); | ||
// $location.path(vm.returnPage); | ||
// }); | ||
// }; | ||
|
||
} | ||
|
||
})(); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<navigation></navigation> | ||
|
||
<div class="container"> | ||
|
||
<div class="row"> | ||
|
||
<div class="col-md-6"> | ||
|
||
<h1 class="form-signin-heading">Sign in</h1> | ||
<p class="lead">Not a member? Please <a href="register">register</a> instead.</p> | ||
|
||
<form ng-submit="vm.onSubmit()"> | ||
<div class="form-group"> | ||
<label for="email">Email address</label> | ||
<input type="email" class="form-control" id="email" placeholder="Enter email" ng-model="vm.credentials.email"> | ||
</div> | ||
<div class="form-group"> | ||
<label for="password">Password</label> | ||
<input type="password" class="form-control" id="password" placeholder="Password" ng-model="vm.credentials.password"> | ||
</div> | ||
<button type="submit" class="btn btn-default">Register!</button> | ||
</form> | ||
|
||
</div> | ||
</div> | ||
|
||
</div> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
(function () { | ||
|
||
angular | ||
.module('meanApp') | ||
.controller('registerCtrl', registerCtrl); | ||
|
||
registerCtrl.$inject = ['$location']; | ||
function registerCtrl($location) { | ||
var vm = this; | ||
|
||
// vm.pageHeader = { | ||
// title: 'Create a new Loc8r account' | ||
// }; | ||
|
||
// vm.credentials = { | ||
// name : "", | ||
// email : "", | ||
// password : "" | ||
// }; | ||
|
||
// vm.returnPage = $location.search().page || '/'; | ||
|
||
// vm.onSubmit = function () { | ||
// vm.formError = ""; | ||
// if (!vm.credentials.name || !vm.credentials.email || !vm.credentials.password) { | ||
// vm.formError = "All fields required, please try again"; | ||
// return false; | ||
// } else { | ||
// vm.doRegister(); | ||
// } | ||
// }; | ||
|
||
// vm.doRegister = function() { | ||
// vm.formError = ""; | ||
// authentication | ||
// .register(vm.credentials) | ||
// .error(function(err){ | ||
// vm.formError = err; | ||
// }) | ||
// .then(function(){ | ||
// $location.search('page', null); | ||
// $location.path(vm.returnPage); | ||
// }); | ||
// }; | ||
|
||
} | ||
|
||
})(); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<navigation></navigation> | ||
|
||
<div class="container"> | ||
|
||
<div class="row"> | ||
<div class="col-md-6"> | ||
<h1>Register</h1> | ||
<p class="lead">Already a member? Please <a href="login">log in</a> instead.</p> | ||
<form ng-submit="vm.onSubmit()"> | ||
<div class="form-group"> | ||
<label for="name">Full name</label> | ||
<input type="text" class="form-control" id="name" placeholder="Enter your name" ng-model="vm.credentials.name"> | ||
</div> | ||
<div class="form-group"> | ||
<label for="email">Email address</label> | ||
<input type="email" class="form-control" id="email" placeholder="Enter email" ng-model="vm.credentials.email"> | ||
</div> | ||
<div class="form-group"> | ||
<label for="password">Password</label> | ||
<input type="password" class="form-control" id="password" placeholder="Password" ng-model="vm.credentials.password"> | ||
</div> | ||
<button type="submit" class="btn btn-default">Register!</button> | ||
</form> | ||
</div> | ||
</div> | ||
|
||
</div> |
2 changes: 1 addition & 1 deletion
2
app_client/common/directives/navigation/navigation.template.html
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
<navigation></navigation> | ||
|
||
<h1>Hello there</h1> | ||
<div class="container"> | ||
|
||
<h1>Hello there</h1> | ||
|
||
<p>Won't you please <a href="login">sign in</a> or <a href="register">register</a>?</p> | ||
|
||
</div> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
(function() { | ||
|
||
angular | ||
.module('meanApp') | ||
.controller('profileCtrl', profileCtrl); | ||
|
||
profileCtrl.$inject = ['$location']; | ||
function profileCtrl($location) { | ||
var vm = this; | ||
} | ||
|
||
})(); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<navigation></navigation> | ||
|
||
<div class="container"> | ||
<div class="row"> | ||
|
||
<div class="col-md-6"> | ||
|
||
<h1 class="form-signin-heading">Profile</h1> | ||
|
||
<p class="lead">Update your profile here</p> | ||
|
||
<form ng-submit="vm.onSubmit()"> | ||
<div class="form-group"> | ||
<label for="name">Full name</label> | ||
<input type="text" class="form-control" id="name" placeholder="Enter your name" ng-model="vm.credentials.name"> | ||
</div> | ||
<div class="form-group"> | ||
<label for="email">Email address</label> | ||
<input type="email" class="form-control" id="email" placeholder="Enter email" ng-model="vm.credentials.email"> | ||
</div> | ||
<button type="submit" class="btn btn-default">Update!</button> | ||
</form> | ||
|
||
|
||
</div> | ||
|
||
</div> | ||
</div> |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
This file was deleted.
Oops, something went wrong.