我的菜单中有两次ng-click:
一个切换画布外导航,另一个关闭它。
切换器工作正常,但是在我点击另一个之后它就不再起作用了。
Toggler:
<div class="row menu-bar sticky">
<div ng-include="'shared/nav.html'" class="nav-bar"></div> // This includes the offcanvas
<div ng-click="offcanvas = !offcanvas" class=" button hamb-button">
Menu
</div>
</div>
更紧密:
<div class="offcanvas-container" ng-class="{'offcanvas-container-in': offcanvas}">
<div class="close-offcanvas" ng-click="offcanvas = false">x</div>
<div class="menu">
<ul ng-controller="PagesCtrl">
'...'
</ul>
</div>
</div>
什么可能导致这个问题?