浏览代码

auto close sidebar on search

tags/1.0.0
Robin Thoni 8 年前
父节点
当前提交
42fbd919ee
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3
    2
      app/controllers/sidebar.controller.js

+ 3
- 2
app/controllers/sidebar.controller.js 查看文件

@@ -3,8 +3,8 @@
3 3
  */
4 4
 
5 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 9
             $scope.DataShareBusiness = DataShareBusiness;
10 10
 
@@ -52,6 +52,7 @@ angular.module('app')
52 52
             $scope.goTo = function(group)
53 53
             {
54 54
                 if (group != null) {
55
+                    $mdSidenav('left').toggle();
55 56
                     $scope.Search.value = "";
56 57
                     DataShareBusiness.goToGroup(group);
57 58
                 }

正在加载...
取消
保存