Updated toderp

This commit is contained in:
Max Lynch
2013-10-08 18:16:07 -05:00
parent a175b9ce71
commit 7693f64787
4 changed files with 203 additions and 192 deletions

View File

@ -147,12 +147,15 @@
</script> </script>
<script id="settings.html" type="text/ng-template"> <script id="settings.html" type="text/ng-template">
<div id="login-view" class="modal slide-in-up" ng-controller="SettingsCtrl"> <div id="settings-view" class="modal slide-in-up" ng-controller="SettingsCtrl">
<header class="bar bar-header bar-secondary"> <header class="bar bar-header bar-secondary">
<h1 class="title">Settings</h1> <h1 class="title">Settings</h1>
<button class="button button-clear button-primary" ng-click="close()">Done</button> <button class="button button-clear button-primary" ng-click="close()">Done</button>
</header> </header>
<main class="content padded has-header"> <main class="content padded has-header">
<list header="GENERAL>
<a class="list-item" href="#" ng-click="logout()">Log out</a>
</list>
</main> </main>
</div> </div>
</script> </script>

View File

@ -188,8 +188,11 @@ angular.module('ionic.todo.controllers', ['ionic.todo'])
}); });
}) })
.controller('SettingsCtrl', function($scope) { .controller('SettingsCtrl', function($scope, AuthService) {
$scope.close = function() { $scope.close = function() {
$scope.modal.hide(); $scope.modal.hide();
} }
$scope.logout = function() {
AuthService.logout();
};
}) })

View File

@ -14,7 +14,6 @@ angular.module('ionic.todo.services', ['ionic.todo', 'firebase'])
}); });
return { return {
// Try to log in with the given email and pass // Try to log in with the given email and pass
login: function(email, password) { login: function(email, password) {
if(!email || !password) { if(!email || !password) {
@ -28,6 +27,10 @@ angular.module('ionic.todo.services', ['ionic.todo', 'firebase'])
}); });
}, },
logout: function() {
angularFireAuth.logout();
},
// Try to sign up with the given email and pass // Try to sign up with the given email and pass
signup: function(email, password) { signup: function(email, password) {
if(!email || !password) { if(!email || !password) {

View File

@ -20,6 +20,7 @@
<h1 class="title">Footer</h1> <h1 class="title">Footer</h1>
</header> </header>
<div class="content-wrapper">
<div class="content has-header has-footer"> <div class="content has-header has-footer">
<h3>Default Text Input, Not Inset, No Content Padding</h3> <h3>Default Text Input, Not Inset, No Content Padding</h3>
@ -254,6 +255,7 @@
<p><a class="button button-secondary" href="index.html">Homepage</a></p> <p><a class="button button-secondary" href="index.html">Homepage</a></p>
</div>
</div> </div>