diff --git a/templates/js/controllers/myClassesController.js b/templates/js/controllers/myClassesController.js index e1f7fa1..ccabe30 100644 --- a/templates/js/controllers/myClassesController.js +++ b/templates/js/controllers/myClassesController.js @@ -1,5 +1,6 @@ angular.module('SeHub') -.controller('myClassesController', ['$scope', '$location', '$routeParams', '$cookies', '$cookieStore', '$window', '$location', '$mdToast', '$mdDialog', 'apiService', '$rootScope', function ($scope, $location, $routeParams, $cookies, $cookieStore, $window, $location, $mdToast, $mdDialog, apiService ,$rootScope) +.controller('myClassesController', ['$scope', '$location', '$routeParams', '$cookies', '$cookieStore', '$window', '$location', '$mdToast', '$mdDialog', 'apiService', '$rootScope', + function ($scope, $location, $routeParams, $cookies, $cookieStore, $window, $location, $mdToast, $mdDialog, apiService ,$rootScope) { $scope.isStudent = false; $scope.isCourse = false; @@ -85,7 +86,7 @@ angular.module('SeHub') $mdDialog.show($mdDialog.alert().title('Course Created').content('You have created course successfully.') .ariaLabel('Email verification alert dialog').ok('Lets Start!').targetEvent()) .then(function() { - $window.location.href = 'templates/views/newCourse.html'; // TODO TODO TODO + $location.path('/newCourse'); // TODO TODO TODO }); // Pop-up alert }).error(function(err) { diff --git a/templates/js/controllers/newCourseController.js b/templates/js/controllers/newCourseController.js index 3eccaea..f330cdf 100644 --- a/templates/js/controllers/newCourseController.js +++ b/templates/js/controllers/newCourseController.js @@ -1,8 +1,9 @@ angular.module('SeHub') -.controller('newCourseController', ['$scope', '$cookies', '$cookieStore', '$window', '$location', '$mdToast', '$mdDialog', 'apiService', '$rootScope', function ($scope, $cookies, $cookieStore, $window, $location, $mdToast, $mdDialog, apiService ,$rootScope) +.controller('newCourseController', ['$scope', '$cookies', '$cookieStore', '$window', '$location', '$mdToast', '$mdDialog', 'apiService', '$rootScope', + function ($scope, $cookies, $cookieStore, $window, $location, $mdToast, $mdDialog, apiService ,$rootScope) { $scope.goBack = function() { - $window.location.href = 'templates/views/myClasses.html'; + $location.path('/myClasses'); } }]); \ No newline at end of file