mw-loader

1.0.0 • Public • Published

mw-loader

AngularJS module that give you a cool loader animation on an element.

Requirements (tested in)

  • Angular (v1.6.9)

Install

You can install this package either with npm or with bower.

npm

npm install mw-loader --save

bower

bower install mw-loader

Usage

Once the script is included in your html file, simply include the module in your app:

angular.module('myApp', ['mw-loader']);

And trigger a 'mw-loader-on' event thusly:

$rootScope.$broadcast('mw-loader-on');

The Loader will be closed if you trigger the 'mw-loader-off' event:

$rootScope.$broadcast('mw-loader-off');

You can pass the parameter 'timeout' to the event to hide the loader automaticly after a while

$rootScope.$broadcast('mw-loader-on', {"timeout": 1000});

Config

Name Type Default Description
parent_selector string body set the parent selector for the alert
on_startup int true should the loader be active on startup
templateUrl string mw-alert.html set the template URL

Demo

View demo on Plunker

Example

Loader example

Tasklist

  • fix spelling, grammar mistakes

Package Sidebar

Install

npm i mw-loader

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

1.94 MB

Total Files

29

Last publish

Collaborators

  • mrwook