AngularJS: Added Home Route + Home Controller + Home View

This commit is contained in:
Sagi Dayan 2015-06-16 14:15:59 +03:00
parent ab09d9851c
commit 11b7aef006
6 changed files with 46 additions and 1 deletions

View file

@ -154,4 +154,10 @@ body.noscroll
border-left: 2px black solid;
border-right: 2px black solid;
border-radius: 1px black solid;
}*/
}*/
.gray-font{
color: #7f7f7f;
font-size: 300%;
text-shadow:#e0e0e0 1px 1px 0;
}

View file

@ -33,6 +33,10 @@ app.config(['$routeProvider', '$locationProvider',
.when('/register', {
templateUrl: 'templates/views/register.html',
controller: 'registerController'
})
.when('/home', {
templateUrl: 'templates/views/home.html',
controller: 'homeController'
});
}

View file

@ -0,0 +1,10 @@
/**
* Created by sagi on 6/16/15.
*/
angular.module('SeHub')
.controller('homeController', ['$scope', '$cookies', '$cookieStore', '$window', '$location', '$mdToast', '$mdDialog', 'apiService', '$rootScope', function ($scope, $cookies, $cookieStore, $window, $location, $mdToast, $mdDialog, apiService ,$rootScope)
{
}]);

View file

@ -17,7 +17,10 @@ angular.module('SeHub')
$scope.isInRegisterMode = true;
$scope.loadingData = false;
$location.path('/register')
}else{
$location.path('/home')
}
})
$scope.loadingData = false;

View file

@ -2,4 +2,25 @@
<div class="loader" ng-if="loadingData">
<md-progress-circular md-mode="indeterminate"></md-progress-circular>
</div>
<md-content layout-padding>
<md-card class="gray-font">
<div layout="row">
<div class="spacer"></div>
<div>
<h1><i class="fa fa-graduation-cap"></i></h1>
</div>
<div class="spacer"></div>
</div>
<div layout="row">
<div class="spacer"></div>
<div>
<h1>Welcome To SE-Hub</h1>
<p>
This Is your Home Page
</p>
</div>
<div class="spacer"></div>
</div>
</md-card>
</md-content>
</div>

View file

@ -68,6 +68,7 @@
<!-- Controllers -->
<script src="templates/js/controllers/mainController.js"></script>
<script src="templates/js/controllers/homeController.js"></script>
<script src="templates/js/controllers/registerController.js"></script>
</body>