javascript - ngAnimate replace one div with another -


lets have following:

<div class="container">  <div class="row>     <div id="first" ng-show="condition" class="in-out">content here...</div>     <div id="second" ng-hide="condition" class="in-out">other content here...</div> </div>  </div>  <style>  .in-out.ng-hide-add, .in-out.ng-hide-remove {   transition:1s linear all; }  .in-out.ng-hide-add {   //opacity: 0; } .in-out.ng-hide-add.ng-hide-add-active {   opacity: 0;  } .in-out.ng-hide-remove {   //opacity: 1; } .in-out.ng-hide-remove.ng-hide-remove-active {   opacity: 1; } </style> 

how can gracefully replace 1 div other. means following:

  1. first visible, second not
  2. condition changes - first fades away
  3. second fades in in place of first
  4. all without altering size of main container


Comments

Popular posts from this blog

javascript - Slick Slider width recalculation -

jsf - PrimeFaces Datatable - What is f:facet actually doing? -

angular2 services - Angular 2 RC 4 Http post not firing -