You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

mw-alert

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mw-alert

AngularJS module that provide contextual feedback messages for typical user actions.

1.0.4
latest
npmnpm
Version published
Maintainers
1
Created
Source

License codebeat badge dependencies Status npm version

mw-alert

AngularJS module that provide contextual feedback messages for typical user actions.

Requirements (tested in)

  • Angular (v1.7.2)

Install

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

npm

npm install mw-alert --save

bower

bower install mw-alert

Usage

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

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

And use the function 'open' from the Service 'mwAlertService' thusly:

mwAlertService.open({"type": "success", "text": "It is working."})

The alert can be closed from the user with a click on the close button or can be closed inside the code

mwAlertService.close()

You can pass the parameter 'timeout' and 'close_auto' to the message object to change the behaviour of this single message

mwAlertService.open({"type": "success", "text": "It is working.", "close_auto": false})

Config

NameTypeDefaultDescription
parent_selectorstringbodyset the parent selector for the alert
timeoutstring3000set the timeout
close_autobooleantrueshould the alert be closed automaticly
templateUrlstringmw-alert.htmlset the template URL

Demo

View demo on Plunker

Tasklist

  • fix spelling, grammar mistakes
  • create tests

Keywords

mw-alert

FAQs

Package last updated on 19 Jun 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts