Created
July 30, 2015 03:38
-
-
Save SIRHAMY/2eb1e77a4416c839f52e to your computer and use it in GitHub Desktop.
Angular example using CSS to hide elements instead of ng-show and ng-hide
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
.chartdisplay img { | |
display: block; | |
height: 100%; | |
width: 100%; | |
} | |
.hide { | |
visibility: hidden; | |
opacity: 1; | |
} |
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
<div class="col-md-6 col-sm-6 col-lg-6 chartdisplay" | |
ng-class="{ 'fullscreen' : fullscreen }" style="z-index: 500;"> | |
<div ng-show="!isVisible()" class="chart"></div> | |
<img ng-class="{ 'hide' : !isVisible() }"/> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment