Carousel slide effect with ng hide/show and ng-animate? <p>I have a slider type carousel with two section containers that can slide left and right. In my developed version I have images inside one section container. The problem I'm experiencing is that because my images from the server take a while to load I'm finding that when the user clicks the back button the page is being added to the DOM again (due to ng switch) and is having to reload the images.</p> <p>My question: Is there a way to use ngif or hide/show with this instead so that the page is simply setting display: none when hidden so that the page containers not currently shown are not removed from the DOM?</p> <pre><code> &lt;!--ANIMATE--&gt; &lt;div ng-animate="{enter: 'enter', leave: 'leave';}" ng-switch on="par.selection"&gt; &lt;!--PAGE1--&gt; &lt;div class="page page1" ng-switch-when="settings"&gt; &lt;b&gt;page 1&lt;/b&gt;&lt;br&gt;&lt;br&gt; &lt;button ng-click="par.selection = 'home'; go('front');" &gt;go page 2&lt;/button&gt; &lt;/div&gt; &lt;!--PAGE2--&gt; &lt;div class="page page2" ng-switch-when="home"&gt; &lt;b&gt;page 2&lt;/b&gt;&lt;br&gt;&lt;br&gt; &lt;button ng-click="par.selection = 'settings'; go('back');" &gt;go page 1&lt;/button&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p>Plunkr here: <strong><a href="http://plnkr.co/edit/Vvvsp1s45xvejRJt7cD0?p=preview" rel="nofollow">LINK</a></strong></p> <p>I made the above example from a blog I visited a phew days ago which I can no longer seem to find but the above example works using the ng-switch method.</p>