diff --git a/webclient/app-controller.js b/webclient/app-controller.js
index c53f29aa77..92ad01e4f9 100644
--- a/webclient/app-controller.js
+++ b/webclient/app-controller.js
@@ -66,7 +66,7 @@ angular.module('MatrixWebClientController', ['matrixService'])
matrixService.saveConfig();
// And go to the login page
- $location.path("login");
+ $location.url("login");
};
// Listen to the event indicating that the access token is no longer valid.
diff --git a/webclient/login/login-controller.js b/webclient/login/login-controller.js
index 67d0b7b90c..2f1f224a94 100644
--- a/webclient/login/login-controller.js
+++ b/webclient/login/login-controller.js
@@ -53,7 +53,7 @@ angular.module('LoginController', ['matrixService'])
matrixService.saveConfig();
eventStreamService.resume();
// Go to the user's rooms list page
- $location.path("rooms");
+ $location.url("rooms");
},
function(error) {
if (error.data) {
@@ -84,7 +84,7 @@ angular.module('LoginController', ['matrixService'])
});
matrixService.saveConfig();
eventStreamService.resume();
- $location.path("rooms");
+ $location.url("rooms");
}
else {
$scope.feedback = "Failed to login: " + JSON.stringify(response.data);
diff --git a/webclient/room/room-controller.js b/webclient/room/room-controller.js
index 451c6242f6..26d1836fc2 100644
--- a/webclient/room/room-controller.js
+++ b/webclient/room/room-controller.js
@@ -293,7 +293,7 @@ angular.module('RoomController', ['ngSanitize', 'mUtilities'])
else {
// In case of issue, go to the default page
console.log("Error: cannot extract room alias");
- $location.path("/");
+ $location.url("/");
return;
}
}
@@ -310,7 +310,7 @@ angular.module('RoomController', ['ngSanitize', 'mUtilities'])
function () {
// In case of issue, go to the default page
console.log("Error: cannot resolve room alias");
- $location.path("/");
+ $location.url("/");
});
}
};
@@ -364,7 +364,7 @@ angular.module('RoomController', ['ngSanitize', 'mUtilities'])
matrixService.leave($scope.room_id).then(
function(response) {
console.log("Left room ");
- $location.path("rooms");
+ $location.url("rooms");
},
function(error) {
$scope.feedback = "Failed to leave room: " + error.data.error;
diff --git a/webclient/rooms/rooms-controller.js b/webclient/rooms/rooms-controller.js
index c2d7bcb6f3..557fbe2378 100644
--- a/webclient/rooms/rooms-controller.js
+++ b/webclient/rooms/rooms-controller.js
@@ -141,17 +141,17 @@ angular.module('RoomsController', ['matrixService', 'mFileInput', 'mFileUpload',
// Go to a room
$scope.goToRoom = function(room_id) {
// Simply open the room page on this room id
- //$location.path("room/" + room_id);
+ //$location.url("room/" + room_id);
matrixService.join(room_id).then(
function(response) {
if (response.data.hasOwnProperty("room_id")) {
if (response.data.room_id != room_id) {
- $location.path("room/" + response.data.room_id);
+ $location.url("room/" + response.data.room_id);
return;
}
}
- $location.path("room/" + room_id);
+ $location.url("room/" + room_id);
},
function(error) {
$scope.feedback = "Can't join room: " + error.data;
@@ -163,7 +163,7 @@ angular.module('RoomsController', ['matrixService', 'mFileInput', 'mFileUpload',
matrixService.joinAlias(room_alias).then(
function(response) {
// Go to this room
- $location.path("room/" + room_alias);
+ $location.url("room/" + room_alias);
},
function(error) {
$scope.feedback = "Can't join room: " + error.data;
|