# mw-loader

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

Latest version **1.0.0** (published 2018-05-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install mw-loader
pnpm add mw-loader
yarn add mw-loader
bun add mw-loader
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2018-05-11 |
| First published | 2018-05-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 1.9 MB |
| Known vulnerabilities | 0 (+10 in 1 direct dependencies) |
| Install scripts | no |
| Author | MrWook |
| Maintainers | mrwook |
| Keywords | mw-loader, loader, spinner |

## Links

- npm: https://www.npmjs.com/package/mw-loader
- Homepage: https://github.com/MrWook/mw-loader
- npm.io page: https://npm.io/package/mw-loader

## Dependencies (1)

- [angular](https://npm.io/package/angular.md) ^1.6.9

## Recent versions

- 1.0.0 (latest) — 2018-05-11

## README

# 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

```shell
npm install mw-loader --save
```

### bower

```shell
bower install mw-loader
```

## Usage

Once the script is included in your html file, simply include the module in your app:
```javascript
angular.module('myApp', ['mw-loader']);
```
    

And trigger a 'mw-loader-on' event thusly:
```javascript
$rootScope.$broadcast('mw-loader-on');
```

The Loader will be closed if you trigger the 'mw-loader-off' event:
```javascript
$rootScope.$broadcast('mw-loader-off');
```

You can pass the parameter 'timeout' to the event to hide the loader automaticly after a while
```javascript
$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

<a href='https://plnkr.co/edit/dS3jpBmmUW0LBaTVDA3t?p=preview' target='_blank'>View demo on Plunker</a>

## Example

![Loader example](https://github.com/MrWook/mw-loader/blob/master/public/gif/mw-loader.gif)

## Tasklist 
- [ ] fix spelling, grammar mistakes

---
_Source: https://npm.io/package/mw-loader · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
