如何从弹出按钮点击Ionic关闭侧边菜单?

问题描述 投票:4回答:2

我一直在侧面菜单中修改我的弹出菜单一段时间在离子框架中,并尝试关闭侧面菜单,点击我在弹出窗口中创建的按钮。有没有可行的方法呢?

angularjs button popup ionic-framework
2个回答
7
投票
function ContentController($scope, $ionicSideMenuDelegate) {
  $scope.toggleLeft = function() {
    $ionicSideMenuDelegate.toggleLeft();
  };
}

0
投票

如需关闭菜单:

$ionicSideMenuDelegate.toggleLeft(false);

来自离子的代码:

enter image description here

enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.