Socket
Socket
Sign inDemoInstall

mw-alert

Package Overview
Dependencies
1
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    mw-alert

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


Version published
Weekly downloads
0
Maintainers
1
Install size
2.06 MB
Created
Weekly downloads
 

Readme

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

FAQs

Last updated on 19 Jun 2018

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc