diff --git a/client/app/app.js b/client/app/app.js index 847f989..0eccfc9 100644 --- a/client/app/app.js +++ b/client/app/app.js @@ -38,6 +38,7 @@ angular.module('ramblApp', $httpProvider.interceptors.push('AttachTokens'); }]) + .factory('AttachTokens', ['$window', function ($window) { var attach = { @@ -51,6 +52,7 @@ angular.module('ramblApp', }; return attach; }]) + .run(['$rootScope', '$location', '$window', 'Auth', function($rootScope, $location, $window, Auth) { diff --git a/client/app/room/room.js b/client/app/room/room.js index 8240d47..c558ff7 100644 --- a/client/app/room/room.js +++ b/client/app/room/room.js @@ -2,7 +2,7 @@ angular.module('ramblApp.room', []) .controller('roomController', ['$scope', '$window', '$location', 'EasyRTC', 'InterviewQuestions', 'Auth', function ($scope, $window, $location, EasyRTC, InterviewQuestions, Auth) { - $scope.data = {}; + $scope.data = {}; $scope.data.currentRoom = EasyRTC.getCurrentRoom(); $scope.data.userName = $window.localStorage.getItem('ramblUsername'); $scope.data.questions = InterviewQuestions.questions; @@ -15,6 +15,6 @@ angular.module('ramblApp.room', []) $scope.leaveRoom = EasyRTC.leaveRoom; // set up elements for local and remote streams, set up room occupant listener - EasyRTC.interviewInit(); + EasyRTC.interviewInit(); }]); diff --git a/client/app/services/easyrtc_services.js b/client/app/services/easyrtc_services.js index 284fa0d..d86afee 100644 --- a/client/app/services/easyrtc_services.js +++ b/client/app/services/easyrtc_services.js @@ -142,9 +142,9 @@ angular.module('ramblApp.easyRTCServices', []) // connects to easyrtc if the flag is set to false var connect = function (callback) { var connectSuccess = function (selfId) { - - // this callback gets the room list connectionEstablished = true; + + // this callback gets the room list callback(); }; var connectFailure = function (err) { @@ -154,7 +154,7 @@ angular.module('ramblApp.easyRTCServices', []) // prevent connection attempt when going back to lobby from room if (connectionEstablished === false) { - // User name gets set here for easy rtc + // User name gets set here for easyrtc $window.easyrtc.setUsername($window.localStorage.getItem('ramblUsername')); $window.easyrtc.connect('interview', connectSuccess, connectFailure); }