I'm trying to use a loader like this one: http://codepen.io/max-scopp/pen/FArlb
I have it placed outside my ng-view div in the index.html. At the moment, it's looping regardless of what's going on in the ng-view div. I want that loader to run only when the ng-view is loading content and stop on a certain color when it is done loading… can anyone point me in the right direction?
HTML:
<div class="loader">
<div class="green"></div>
<div class="red"></div>
<div class="blue"></div>
<div class="yellow"></div>
</div>
Javascript:
$(document).ready(function() {
$('.green').addClass('sd0');
$('.red').addClass('sd05');
$('.blue').addClass('sd1');
$('.yellow').addClass('sd15');
});