summary refs log tree commit diff
path: root/webclient/room
diff options
context:
space:
mode:
authorEmmanuel ROHEE <erohee@amdocs.com>2014-08-22 11:43:54 +0200
committerEmmanuel ROHEE <erohee@amdocs.com>2014-08-22 11:44:09 +0200
commitdde50d4245136cdbd11ac3b4af42102945cd14f9 (patch)
treebdf0f420429116b2ca23aa2072e012ea51270bad /webclient/room
parentMake the content repo work with in daemon mode. Return the full url on upload... (diff)
downloadsynapse-dde50d4245136cdbd11ac3b4af42102945cd14f9.tar.xz
Use $location.url instead of $location.path to get clean page URL without hash arguments of the previous page.
This happpens with room URL like http://127.0.0.1:8080/matrix/client/#/room/#public:localhost. The second hash part is transferred to the next page when using $location.path.
Diffstat (limited to 'webclient/room')
-rw-r--r--webclient/room/room-controller.js6
1 files changed, 3 insertions, 3 deletions
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;