View on GitHub

Anguloader

Easy to use Http Loader for your Angular Js project

Download this project as a .zip file Download this project as a tar.gz file

Anguloader

Angular component which shows a loader screen in case of a pending Http Request.

Maintainer: Zsolt Rádonyi <radonyi.zsolt@gmail.com>

Installation

Bower:

bower install --save anguloader

Usage

Load angular-loader.min.js and angular-loader.min.css:

<link rel="stylesheet" href="path/to/dist/angular-loader.min.css" />
<script src="path/to/dist/angular-loader.min.js"></script>

Add the anguloader module as a dependency in your application:

angular.module('demo', ['anguloader'])

Add an HTML element with the anguloader directive. This will be displayed while requests are pending

As an attribute:

<div anguloader></div>

As a Tag:

<anguloader></anguloader>

Configuration

Config

app.config(function(anguloaderConfigProvider){
    anguloaderConfigProvider.setConfig({
        backdrop: false, //true,false
        loader: 'default', //default,waveform,cube,loading,sphere,square
        timeout: 5000 //If request not responding
    });
});

Blacklist

app.config(function(anguloaderConfigProvider){
    anguloaderConfigProvider.setBlackList([
        "http://example.com",
        "http://dummy.com"
    ]);
});

Future Plans