(function() {
    'use strict';
    
    angular
        .module('student')
        .factory('lectureFactory', lectureFactory);

    /* @ngInject */
    function lectureFactory(lectureService, $location) {
        console.log('Ready (Lecture Factory)');
        var lectureId;
    
        var service = {
            joinLecture: joinLecture,
            leaveLecture: leaveLecture,
            loadLecture: loadLecture,
            getComments: getComments
        };
        
        return service;
        
        function joinLecture(id) {
            lectureId = id;
            $location.path('/lecture');
        }
        
        function leaveLecture() {
            lectureId = undefined;
            $location.path('/');
        }
        
        function loadLecture() {
            if (lectureId !== undefined) {
                lectureService.retrieveSlides
                    .get({id: lectureId}, onSuccess, onFail);
            } else {
                $location.path('/');
            }
            
            function onSuccess(value, responseHeaders) {
                console.log('Success', value);
            }
            
            function onFail(httpResponse) {
                console.log('Error');
            }
        }
        
        function getComments(onSuccess, onFail) {
            if (angular.isDefined(lectureId)) {
                lectureService.retrieveComments
                    .get({id: lectureId}, onSuccess, onFail);
            } else {
                $location.path('/');
            }
        }
    }
})();
@@ -1422,35 +1422,37 @@
                .
-get
+query
 (%7Bid: lectureId%7D
@@ -1477,66 +1477,8 @@
 l);%0A
-            %7D else %7B%0A                $location.path('/');%0A
     

Change resource get method.