ng-loaders

WebJar for ng-loaders

Лицензия

Лицензия

MIT
Группа

Группа

org.webjars.bower
Идентификатор

Идентификатор

ng-loaders
Последняя версия

Последняя версия

0.2.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

ng-loaders
WebJar for ng-loaders
Ссылка на сайт

Ссылка на сайт

http://webjars.org
Система контроля версий

Система контроля версий

https://github.com/jfeigel/ngLoader

Скачать ng-loaders

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.webjars.bower/ng-loaders/ -->
<dependency>
    <groupId>org.webjars.bower</groupId>
    <artifactId>ng-loaders</artifactId>
    <version>0.2.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.bower/ng-loaders/
implementation 'org.webjars.bower:ng-loaders:0.2.0'
// https://jarcasting.com/artifacts/org.webjars.bower/ng-loaders/
implementation ("org.webjars.bower:ng-loaders:0.2.0")
'org.webjars.bower:ng-loaders:jar:0.2.0'
<dependency org="org.webjars.bower" name="ng-loaders" rev="0.2.0">
  <artifact name="ng-loaders" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.bower', module='ng-loaders', version='0.2.0')
)
libraryDependencies += "org.webjars.bower" % "ng-loaders" % "0.2.0"
[org.webjars.bower/ng-loaders "0.2.0"]

Зависимости

Библиотека не имеет зависимостей. Это самодостаточное приложение, которое не зависит ни от каких других библиотек.

Модули Проекта

Данный проект не имеет модулей.

ngLoader

Loading animation for AngularJS

Used the SVG loading animations from this Pen by Aurer.

This module can be used in any version of Angular (see the Plunk below). All major browsers, except IE, are supported. Template 9, the default and now using CSS animations, is supported in IE10+ and the other templates are not supported in IE.

1. Install the module via bower.
bower install ng-loaders
2. Add the module as a dependency
angular.module('app',['ngLoader']);
3. Include the CSS file in your HTML file or import it in your CSS
<link rel="stylesheet" href="/bower_components/ngLoader/ngLoader.min.css">

OR

@import "bower_components/ngLoader/ngLoader.min.css";
4. Include the JS file in your HTML file
<script src="bower_components/ngLoader/ngLoader.min.js"></script>
5. Add the loader in your view and ensure the corresponding scope variable is defined
<loader
	working="scopeWorkingVariable"
	disable-background="true"
	message="scopeMessageVariable"
	template="9">
</loader>

Example

This loader can be used in many instances, one in which being for AJAX requests using Anuglar's $http service. Set your scope variable to true before the request and in the finally condition of the promised returned.

Example plunk can be found here.

$scope.working = true;
$scope.message = 'Loading...'
$http.get('<api endpoint>').then(
	function(success) {
		console.log('Success! ' + success);
	},
	function(error) {
		console.error('Error! ' + error);
	}
)['finally'](function() {
	$scope.working = false;
});

Options

Only the working attribute is required.

Attribute Default Accepted Values
working name of scope variable Any valid scope variable
disable-background false true or false
message undefined Any string
template 9 Any number 1-9

Notes

Styles of the loader can be updated / modified by targeting the loader-content class.

Версии библиотеки

Версия
0.2.0