Socket
Socket
Sign inDemoInstall

ng-snotify

Package Overview
Dependencies
5
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    ng-snotify

Angular 2 notifications center


Version published
Weekly downloads
2.7K
decreased by-12.5%
Maintainers
1
Install size
145 kB
Created
Weekly downloads
 

Changelog

Source

v1.3.0

  • add Custom Styling - Read more
  • fix max-height collapsing closeOnClick

Readme

Source

ng-snotify

Build Status NPM Version NPM Downloads

Example

https://artemsky.github.io/ng-snotify/

Features

  • 8 types of toast notifications
  • Flexible, Configurable
  • Custom styling
  • Lifecycle callbacks
  • Fully CSS, no angular animations dependency!

Installation

NPM 5

npm install ng-snotify

NPM 4

npm install ng-snotify --save

Import Module

Import SnotifyModule, also you can try SnotifyModule.forRoot() if you have build errors
And provide SnotifyService

// Import your library
import { SnotifyModule, SnotifyService } from 'ng-snotify';

@NgModule({
  imports: [
    BrowserModule,
    SnotifyModule
  ],
  providers: [SnotifyService]
})
export class AppModule { }
Add selector

Add app-snotify component to you root component

<app-snotify></app-snotify>
Dependency injection

Now you should inject SnotifyService

import {SnotifyService} from 'ng-snotify';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.css']
})
export class AppComponent {
  constructor(private snotifyService: SnotifyService) {}
}

Documentation and Examples

Wiki - here
Examples - here
Example application source - here
Auto-Documentation - here

Development

  • npm run build
  • cd src
  • npm link
  • cd ..
  • npm link ng-snotify
  • Run component build:watch npm run build:watch
  • Run example app ng serve --open
  • open localhost:4200 in your browser
  • go to ./src
  • Start developing!

Known issues

  • Compodoc stopped generate interfaces - (source)

License

MIT © artemsky

Change Log

v1.3.0

  • add Custom Styling - Read more
  • fix max-height collapsing closeOnClick

v1.2.0

  • add custom icons Wiki
    You can see an example of custom icon by calling Simple toast in the example app

v1.1.7

  • fix AOT compilation (#13)

v1.1.6

  • Add callback text when No button pressed (Prompt)
  • Improve documentation
  • Create wiki

v1.1.4

  • remove min-height (#11)
  • fix max-height animation
  • change 2-branches developing (develop\master) onto 1 branch (master)
  • Upgrade example app angular cli 1.0.2 -> 1.1.0
  • Upgrade yeomen generator-angular2-library 10.0.0 -> 10.2.2

v1.1.3

  • fix TruncatePipe error (#9)
  • fix box-sizing

v1.1.2

  • fix async toast (#8)
  • add truncate pipe
  • add toast titleMaxLeght and bodyMaxLeght to SnotifyConfig
  • add toast maxHeight to SnotifyOptions (#7)
  • add body to prompt type and replace input preview text wih new option placeholder of SnotifyConfig type

v1.0.0

  • First release

Future

  • rename component to ng2-snotify due semantic purpose

Keywords

FAQs

Last updated on 11 Jun 2017

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