-
Notifications
You must be signed in to change notification settings - Fork 0
/
mainController.js
63 lines (59 loc) · 2.18 KB
/
mainController.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
var app = angular.module('myApp',['ngResource', 'ngRoute', 'rzModule', 'ngTagsInput', 'chart.js', 'ui.bootstrap']);
app.config(function($routeProvider) {
$routeProvider
.when('/login', {
templateUrl : 'components/login/login-template.html',
controller: 'LoginController'
})
.when('/explore', {
templateUrl : 'components/explore/explore-template.html',
controller: 'ExploreController'
})
.when('/class/:classID', {
templateUrl : 'components/class/class-template.html',
controller: 'ClassController'
})
.when('/teacher-class/:classID', {
templateUrl : 'components/teacher-class/teacher-class-template.html',
controller: 'TeacherClassController'
})
.when('/bookmarks', {
templateUrl : 'components/bookmarks/bookmarks-template.html',
controller: 'BookmarksController'
})
.when('/review', {
templateUrl : 'components/review/review-template.html',
controller: 'ReviewController'
})
.when('/review/:classID', {
templateUrl : 'components/review-class/review-class-template.html',
controller: 'ReviewClassController'
})
.when('/teacher-home', {
templateUrl : 'components/teacher-home/teacher-home-template.html',
controller: 'TeacherHomeController'
})
.when('/edit-form/:classID', {
templateUrl : 'components/edit-form/edit-form-template.html',
controller: 'EditFormController'
})
.when('/pinned-feedback', {
templateUrl : 'components/pinned-feedback/pinned-feedback-template.html',
controller: 'PinnedFeedbackController'
})
.when('/profile', {
templateUrl : 'components/profile/profile-template.html',
controller: 'ProfileController'
})
.when('/my-reviews', {
templateUrl : 'components/my-reviews/my-reviews-template.html',
controller: 'MyReviewsController'
})
.otherwise({
redirectTo: '/login'
});
});
app.controller('MainController', ['$scope', '$resource', '$route', function($scope, $resource, $route) {
$scope.main = {};
$scope.main.reviewSubmitted = false;
}]);