I have a service that is responsible for displaying the loading bar on the screen. I add the loading bar dynamically as follows
coreModule.provider('$loading', function () { this.$get = ['$document', function ($document) { var element = angular.element('<div id="loading" class="loading">' + '<img src="../styling/img/loading.gif" alt="loading .... ">' + '</div>'); return { inProgress:function (message) { $document.find('body').append(element); }, finish:function () {
However, the completion function generally works. It removes an element from the body. Any ideas?
source share