server,email,pw as url params

This commit is contained in:
Mo Bitar
2017-02-27 08:02:10 -06:00
parent a5d00aa0c9
commit fc6fc10ceb
2 changed files with 9 additions and 2 deletions

View File

@@ -1,5 +1,12 @@
angular.module('app.frontend')
.controller('HomeCtrl', function ($scope, $rootScope, $timeout, modelManager, syncManager, authManager) {
.controller('HomeCtrl', function ($scope, $stateParams, $rootScope, $timeout, modelManager, syncManager, authManager) {
if($stateParams.server && $stateParams.email && authManager.offline()) {
authManager.login($stateParams.server, $stateParams.email, $stateParams.pw, function(response){
window.location.reload();
})
}
syncManager.loadLocalItems(function(items) {
$scope.$apply();

View File

@@ -7,7 +7,7 @@ angular.module('app.frontend')
})
.state('home', {
url: '/',
url: '/?server&email&pw',
parent: 'base',
views: {
'content@' : {