Coder Social home page Coder Social logo

ng-toaster-demo's Introduction

NgToasterDemo

The code serves to implement ngx-toastr in angular

Setting up ngx-toastr

Run the following commands to install ngx-toastr npm i ngx-toastr --save

Run the follwing to install angular animations, this is becouse ngx-toastr uses angular animations npm install @angular/animations --save

Note: that ngx-toastr can also be used without angular animations but angular animations are easy to use.

Set up the the ngx-toastr css to angular.json for its styles to be compiled

Use the below if you are using angular cli 6 and above, add the second line in styles under styles.scss

  "styles.scss",
  "node_modules/ngx-toastr/toastr.css"
]

Use the following for angular bellow cli 6

  "styles.scss",
  "../node_modules/ngx-toastr/toastr.css"
]

Add the below line to import ngx-toastr module in the app import { ToastrModule } from 'ngx-toastr';

In app modules add the below setting in imports array

   BrowserModule,
   AppRoutingModule,
   ToastrModule.forRoot({
     progressBar:true,
     progressAnimation: 'increasing',
     preventDuplicates: true
   })
 ],

Screenshots

success button clicked

Error button clicked

Warning button clicked

Information button clicked

To refere to this project

  • clone the repo
  • run npm install
  • open your browser and run localhost:4200

For more details

Author

[email protected]

ng-toaster-demo's People

Contributors

patrickniyogitare28 avatar

Watchers

 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.