mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
sideMenu menuNav directive to stop next view animation and close side-menu
This commit is contained in:
20
js/ext/angular/src/directive/ionicSideMenu.js
vendored
20
js/ext/angular/src/directive/ionicSideMenu.js
vendored
@@ -299,5 +299,23 @@ angular.module('ionic.ui.sideMenu', ['ionic.service.gesture', 'ionic.service.vie
|
||||
};
|
||||
}
|
||||
};
|
||||
});
|
||||
})
|
||||
|
||||
|
||||
.directive('menuNav', ['$ionicViewService', function($ionicViewService) {
|
||||
return {
|
||||
restrict: 'AC',
|
||||
require: '^ionSideMenus',
|
||||
link: function($scope, $element, $attr, sideMenuCtrl) {
|
||||
$element.bind('click', function(){
|
||||
$ionicViewService.nextViewOptions({
|
||||
disableAnimate: true,
|
||||
disableBack: true
|
||||
});
|
||||
sideMenuCtrl.close();
|
||||
});
|
||||
}
|
||||
};
|
||||
}]);
|
||||
|
||||
})();
|
||||
|
||||
Reference in New Issue
Block a user