mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-07 06:57:02 +08:00
Updated toderp
This commit is contained in:
@ -147,12 +147,15 @@
|
||||
</script>
|
||||
|
||||
<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">
|
||||
<h1 class="title">Settings</h1>
|
||||
<button class="button button-clear button-primary" ng-click="close()">Done</button>
|
||||
</header>
|
||||
<main class="content padded has-header">
|
||||
<list header="GENERAL>
|
||||
<a class="list-item" href="#" ng-click="logout()">Log out</a>
|
||||
</list>
|
||||
</main>
|
||||
</div>
|
||||
</script>
|
||||
|
||||
@ -188,8 +188,11 @@ angular.module('ionic.todo.controllers', ['ionic.todo'])
|
||||
});
|
||||
})
|
||||
|
||||
.controller('SettingsCtrl', function($scope) {
|
||||
.controller('SettingsCtrl', function($scope, AuthService) {
|
||||
$scope.close = function() {
|
||||
$scope.modal.hide();
|
||||
}
|
||||
$scope.logout = function() {
|
||||
AuthService.logout();
|
||||
};
|
||||
})
|
||||
|
||||
@ -14,7 +14,6 @@ angular.module('ionic.todo.services', ['ionic.todo', 'firebase'])
|
||||
});
|
||||
|
||||
return {
|
||||
|
||||
// Try to log in with the given email and pass
|
||||
login: function(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
|
||||
signup: function(email, password) {
|
||||
if(!email || !password) {
|
||||
|
||||
@ -20,6 +20,7 @@
|
||||
<h1 class="title">Footer</h1>
|
||||
</header>
|
||||
|
||||
<div class="content-wrapper">
|
||||
<div class="content has-header has-footer">
|
||||
|
||||
<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>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user