Giter Site home page Giter Site logo

techieinme / ng-softnotify Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dreamweiver/ng-softnotify

0.0 1.0 0.0 1.04 MB

Soft Notifications component developed using Angular 5.0 to show silent chat notification or alert notificataion to user on screen without disturbing the current operation on screen.

Home Page: https://dreamweiver.github.io/ng-softnotify/

License: MIT License

JavaScript 26.45% TypeScript 45.52% CSS 13.36% HTML 14.67%

ng-softnotify's Introduction

Ng-SoftNotify

Soft Notifications component developed using Angular 5.0 to show silent chat notification or alert notificataion to user on screen without disturbing the current operation on screen.

Live Example

Ng-SoftNotify

Installing

Run the below script to install on dependencies on the root directory after cloning the project

npm install

Main Features

  • Silent Notifications on screen without distubing content
  • Multiple alert notifications available via configuration (Success, Error, Warning, Info)
  • Chat Notifications can also be generated with lovely avatars (Iron Man, captain america, Ninja turtle, etc.,)
  • Auto dissmiss functionality with callback
  • simple configuration

How to use Ng-SoftNotify?

Importing the SoftNotifyModule

Import SoftNotifyModule in your app's module by placinng it in imports array.

 import { SoftNotifyModule } from './softNotify/softNotify.module';

 ...

 imports: [
     ...
     SoftNotifyModule  
  ],

Launching Notification/Alert

Use <ng-softnotify> element in your target html template and pass a callback to subscribe for onDismissNotification event.

<ng-softnotify (onDismiss)="onDismissNotification($event)"></ng-softnotify>

Import SoftNotifyService from SoftNotifyModule and call launchNotification with appropriate Notification object(Alert notification or Chat notification).

 ...
    notifications: Notification [] = [ 
      {
          header: 'First Avenger',
          subHeader: 'is offline now',
          body: ' Hi there buddy!!!',
          type: 'chat',
          avatar :'captain-america',
          status : 'offline',
          time: '02:55', 
          autoDismiss:3000 //optional property
        },
        {
          header: 'Data saved successfully',
          subHeader: '',
          body: 'Screen will be updated with latest data',
          type: 'success'
          autoDismiss:50 //optional property
        }];

this.softNotifyService.launchNotification(this.notifications[0]); //lauching the notification

Cool avatars available for Chat Notification (use code)

  • Iron Man (iron-man)
  • Captain America (captain-america)
  • Scream (scream)
  • Ninja Turle (ninja-turtle)
  • Astronaut (astronaut)
  • Alien (alien)
  • Theatre Mask (theatre-mask)
  • Martian (martian)
  • Predator (predator)

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests

Versioning

We use SemVer for versioning.

Authors

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments

  • Special thanks to icon8 team for giving lovely avatars

ng-softnotify's People

Contributors

dreamweiver avatar

Watchers

Lucky avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.