ngToast

WebJar for ngToast

Лицензия

Лицензия

MIT
Группа

Группа

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

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

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

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

2.0.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

ngToast
WebJar for ngToast
Ссылка на сайт

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

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

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

https://github.com/tameraydin/ngToast

Скачать ngtoast

Имя Файла Размер
ngtoast-2.0.0.pom
ngtoast-2.0.0.jar 11 KB
ngtoast-2.0.0-sources.jar 22 bytes
Обзор

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

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

Зависимости

compile (2)

Идентификатор библиотеки Тип Версия
org.webjars.bower : angular jar [1.2.15,1.6)
org.webjars.bower : angular-sanitize jar [1.2.15,1.6)

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

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

ngToast Code Climate Build Status

ngToast is a simple Angular provider for toast notifications.

Demo

Usage

  1. Install via Bower or NPM:
bower install ngtoast --production
# or
npm install ng-toast --production

or manually download.

  1. Include ngToast source files and dependencies (ngSanitize, Bootstrap CSS):
<link rel="stylesheet" href="bower/bootstrap/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="bower/ngtoast/dist/ngToast.min.css">

<script src="bower/angular-sanitize/angular-sanitize.min.js"></script>
<script src="bower/ngtoast/dist/ngToast.min.js"></script>

Note: only the Alerts component is used as style base, so you don't have to include complete CSS

  1. Include ngToast as a dependency in your application module:
var app = angular.module('myApp', ['ngToast']);
  1. Place toast element into your HTML:
<body>
  <toast></toast>
  ...
</body>
  1. Inject ngToast provider in your controller:
app.controller('myCtrl', function(ngToast) {
  ngToast.create('a toast message...');
});
// for more info: http://tameraydin.github.io/ngToast/#api

Animations

ngToast comes with optional animations. In order to enable animations in ngToast, you need to include ngAnimate module into your app:

<script src="bower/angular-animate/angular-animate.min.js"></script>

Built-in

  1. Include the ngToast animation stylesheet:
<link rel="stylesheet" href="bower/ngtoast/dist/ngToast-animations.min.css">
  1. Set the animation option.
app.config(['ngToastProvider', function(ngToastProvider) {
  ngToastProvider.configure({
    animation: 'slide' // or 'fade'
  });
}]);

Built-in ngToast animations include slide & fade.

Custom

See the plunker using animate.css.

  1. Using the additionalClasses option and ngAnimate you can easily add your own animations or wire up 3rd party css animations.
app.config(['ngToastProvider', function(ngToastProvider) {
  ngToastProvider.configure({
    additionalClasses: 'my-animation'
  });
}]);
  1. Then in your CSS (example using animate.css):
/* Add any vendor prefixes you need */
.my-animation.ng-enter {
  animation: flipInY 1s;
}

.my-animation.ng-leave {
  animation: flipOutY 1s;
}

Settings & API

Please find at the project website.

Development

  • Clone the repo or download
  • Install dependencies: npm install && bower install
  • Run grunt watch, play on /src
  • Build: grunt

License

MIT http://tameraydin.mit-license.org/

Maintainers

TODO

  • Add more unit & e2e tests

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

Версия
2.0.0
1.5.6
1.5.2