Last active
July 11, 2017 07:18
-
-
Save michaeljymsgutierrez/16943e156314515807c1d0958aed1661 to your computer and use it in GitHub Desktop.
Adding backdrop to side menu
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$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