Browse Source

auto close sidebar on search

tags/1.0.0
Robin Thoni 8 years ago
parent
commit
42fbd919ee
1 changed files with 3 additions and 2 deletions
  1. 3
    2
      app/controllers/sidebar.controller.js

+ 3
- 2
app/controllers/sidebar.controller.js View File

3
  */
3
  */
4
 
4
 
5
 angular.module('app')
5
 angular.module('app')
6
-    .controller('SideBarController', ['$scope', '$state', 'DataShareBusiness', '$mdDialog',
7
-        function($scope, $state, DataShareBusiness, $mdDialog) {
6
+    .controller('SideBarController', ['$scope', '$state', 'DataShareBusiness', '$mdDialog', '$mdSidenav',
7
+        function($scope, $state, DataShareBusiness, $mdDialog, $mdSidenav) {
8
 
8
 
9
             $scope.DataShareBusiness = DataShareBusiness;
9
             $scope.DataShareBusiness = DataShareBusiness;
10
 
10
 
52
             $scope.goTo = function(group)
52
             $scope.goTo = function(group)
53
             {
53
             {
54
                 if (group != null) {
54
                 if (group != null) {
55
+                    $mdSidenav('left').toggle();
55
                     $scope.Search.value = "";
56
                     $scope.Search.value = "";
56
                     DataShareBusiness.goToGroup(group);
57
                     DataShareBusiness.goToGroup(group);
57
                 }
58
                 }

Loading…
Cancel
Save