Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
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
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
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

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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc