- Create Class reference - fixed

This commit is contained in:
Matan Bar Yosef 2015-06-27 14:52:49 +03:00
parent 191924a732
commit 163a711f0f
2 changed files with 6 additions and 4 deletions

View file

@ -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)
{

View file

@ -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');
}
}]);