summary refs log tree commit diff
diff options
context:
space:
mode:
authorEmmanuel ROHEE <erohee@amdocs.com>2014-09-02 15:12:51 +0200
committerEmmanuel ROHEE <erohee@amdocs.com>2014-09-02 15:12:51 +0200
commite565a4bfc4e78ca695af67c232c6552c673a6306 (patch)
treebff914916eea88bb5ae9d39c4f3190b0821de64c
parentHandle "m.room.create" in order to inform controllers about new rooms (diff)
downloadsynapse-e565a4bfc4e78ca695af67c232c6552c673a6306.tar.xz
BF: Prevent controllers from being instantiated twice.
AngularJS will instantiate it when discovering ng-controller in their respective html files
-rw-r--r--webclient/app.js21
1 files changed, 7 insertions, 14 deletions
diff --git a/webclient/app.js b/webclient/app.js
index 9663ddf967..dac4f048cd 100644
--- a/webclient/app.js
+++ b/webclient/app.js
@@ -36,34 +36,27 @@ matrixWebClient.config(['$routeProvider', '$provide', '$httpProvider',
     function($routeProvider, $provide, $httpProvider) {
         $routeProvider.
             when('/login', {
-                templateUrl: 'login/login.html',
-                controller: 'LoginController'
+                templateUrl: 'login/login.html'
             }).
             when('/register', {
-                templateUrl: 'login/register.html',
-                controller: 'RegisterController'
+                templateUrl: 'login/register.html'
             }).
             when('/room/:room_id_or_alias', {
-                templateUrl: 'room/room.html',
-                controller: 'RoomController'
+                templateUrl: 'room/room.html'
             }).
             when('/room/', {    // room URL with room alias in it (ex: http://127.0.0.1:8000/#/room/#public:localhost:8080) will come here.
                                 // The reason is that 2nd hash key breaks routeProvider parameters cutting so that the URL will not match with 
                                 // the previous '/room/:room_id_or_alias' URL rule
-                templateUrl: 'room/room.html',
-                controller: 'RoomController'
+                templateUrl: 'room/room.html'
             }).
             when('/', {
-                templateUrl: 'home/home.html',
-                controller: 'HomeController'
+                templateUrl: 'home/home.html'
             }).
             when('/settings', {
-                templateUrl: 'settings/settings.html',
-                controller: 'SettingsController'
+                templateUrl: 'settings/settings.html'
             }).
             when('/user/:user_matrix_id', {
-                templateUrl: 'user/user.html',
-                controller: 'UserController'
+                templateUrl: 'user/user.html'
             }).
             otherwise({
                 redirectTo: '/'