define(['./module'],function(controllers){
    'use strict';
    controllers.controller('mainCtrl',['$scope','$rootScope', '$http' ,function($scope,$rootScope, $http){

        $scope.showRigthSide = "_hide";

        $scope.addProblem = function () {
            $scope.showRigthSide = "";
        };

        $scope.rightSidePointerClick = function () {
            $scope.showRigthSide = "_hide";
        };
        $scope.hideDiv = function() {
            $rootScope.$broadcast('Update', '_hide');
        };
        $rootScope.$on("Update", function(event, message) {
            if ($scope.showRigthSide != message){
            $scope.showRigthSide = message;
        }
        });
    }]);
});

define(['./module'],function(controllers){
    'use strict';
    controllers.controller('mainCtrl',['$scope','$rootScope', '$http' ,function($scope,$rootScope, $http){
        $scope.getTitles = function() {
            $http({ method: 'GET', url: 'http://ita-kv.tk:8090/api/getTitles' }).success(function (data) {
        $scope.data = data;
        for (var i = 0; i < $scope.data.length; i++) {
            if ($scope.data[i].Alias === 'about') $scope.data.splice(i,1);
        }
        });
         $scope.deleteResource = function(Alias) {
            $http.delete('/api/deleteResource/' + Alias)
        };
        };
        
        $scope.showRigthSide = "_hide";

        $scope.addProblem = function () {
            $scope.showRigthSide = "";
        };
        $scope.hideDiv = function() {
            $scope.showRigthSide = "_hide";
        };
        $rootScope.$on("Update", function(event, message) {
            if ($scope.showRigthSide != message){
            $scope.showRigthSide = message;
        }
        });
    }]);
});

Update main-controller.js