Skip to content

Instantly share code, notes, and snippets.

@michaeljymsgutierrez
Last active July 11, 2017 07:18
Show Gist options
  • Save michaeljymsgutierrez/16943e156314515807c1d0958aed1661 to your computer and use it in GitHub Desktop.
Save michaeljymsgutierrez/16943e156314515807c1d0958aed1661 to your computer and use it in GitHub Desktop.
Adding backdrop to side menu
$rootScope.$watch(function(){
// Return ratio
return $ionicSideMenuDelegate.getOpenRatio();
},function (ratio){
// Broadcast the value
$rootScope.sidemenuopened = (ratio == 1);
});
// <div ng-class="{'opaque-content' : sidemenuopened}">
// Attach to side menu content
// Alternative CSS approach
// body.menu-open ion-side-menu-content {
// -webkit-transition: opacity 300ms ease-in-out;
// transition: opacity 300ms ease-in-out;
// opacity: 0.5;
// }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment