andrefarzat / ng-jcrop

Angular directive to jCrop jQuery plugin
GNU General Public License v2.0
101 stars 39 forks source link

Don't use ngShow/ngHide. Use ngIf #32

Closed diego-betto closed 9 years ago

diego-betto commented 9 years ago

Don't use ngShow/ngHide in your wrapper or you will end with a 0px box.

Use ngIf since it removes/recreate elements.

ngIf differs from ngShow and ngHide in that ngIf completely removes and recreates the element in the DOM rather than changing its visibility via the display css property. A common case when this difference is significant is when using css selectors that rely on an element's position within the DOM, such as the :first-child or :last-child pseudo-classes.

andrefarzat commented 9 years ago

@diego-betto may I ask you to show me where you've found ngShow/ngHide being used ? I could find only jQuery's show here and hide here.

Please, re open the issue if you found it