Skip to content

Instantly share code, notes, and snippets.

@jacoor
Created August 12, 2014 22:00
Show Gist options
  • Save jacoor/341058b2f7f7fd15b17b to your computer and use it in GitHub Desktop.
Save jacoor/341058b2f7f7fd15b17b to your computer and use it in GitHub Desktop.
Shows preloader on page load and hides when JS starts. Why hides? Because there is no showPreloader variable in $scope.
{% block preloader %}
{% if user.is_authenticated %}
<div data-ng-if="showPreloader">
{% assign name="loadingText" %}{% trans "Loading..." %}{% endassign %}
{% include 'inc/preloader.html' %}
</div>
{% endif %}
{% endblock %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment