| 注册
请输入搜索内容

热门搜索

Java Linux MySQL PHP JavaScript Hibernate jQuery Nginx
e2ex
10年前发布

ng-notify:用于AngularJS应用的轻量级通知模块

ng-notify:用于AngularJS应用的轻量级通知模块。

一个简单,轻量级模块用于在你的AngularJS app中展示消息通知。

包括JS 和CSS文件大约只有4kbs

经测试支持IE8+和最新版本的Chrome, FireFox 和Safari。 

Requirements

AngularJS is the only dependency. Animation is achieved with pure JS, jQuery not necessary.

Installation

You can install ng-notify with Bower.

bower install ng-notify --save

You can also download source files straight from this repo, they're located in thedistdir. Just include the minified version of both js and css files.

Usage

After including ng-notify.min.js and ng-notify.min.css, inject the ng-notify provider into your project.

var app = angular.module('demo', ['ngNotify']);

Now you can trigger notifications from anywhere in your app. To display a notification, just use thesetmethod.

ngNotify.set('Your notification message goes here!');

To specify the type of notification to display, provide the optional type param. (For available types, check the definitions below.)

ngNotify.set('Your error message goes here!', 'error');

项目主页:http://www.open-open.com/lib/view/home/1431607237997

 本文由用户 e2ex 自行上传分享,仅供网友学习交流。所有权归原作者,若您的权利被侵害,请联系管理员。
 转载本站原创文章,请注明出处,并保留原始链接、图片水印。
 本站是一个以用户分享为主的开源技术平台,欢迎各类分享!
 本文地址:https://www.open-open.com/lib/view/open1431607237997.html
ng-notify Web框架 angularjs