Skip to content

Instantly share code, notes, and snippets.

@SIRHAMY
Created July 30, 2015 03:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SIRHAMY/2eb1e77a4416c839f52e to your computer and use it in GitHub Desktop.
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
.chartdisplay img {
display: block;
height: 100%;
width: 100%;
}
.hide {
visibility: hidden;
opacity: 1;
}
<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