npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

cook-toast-ng5

v0.0.8

Published

An Indication for User that what to do NEXT with SLIDE Animation on UI Like Angular.To give warning to user like Please Not try this Again.If I want to show the Success response on the UI.If I want to show the Failure response on UI.

Downloads

5

Readme

Cook your Toast with Cook-Toast - ANGULAR 5

Note - For Angular 4 please reffer to this Cook-Toast-NG4

WARN FAIL

INFO SUCCESS

Installation -


   npm install cook-toast-ng5 --save   

Where its need ?

  • To give the indication to the user what the next step is.
  • To give warning to user like Please Not try this Again.
  • If I want to show the Success response on the UI.
  • If I want to show the Failure response on UI.

How to use ?

Import the CookToastModule in your main NgModule of your application

and insert this module in your imports array of NgModule.


  //main module
  
  import { CookToastModule } from 'cook-toast-ng5';
  @NgModule({
      imports :[
          CookToastModule
      ]
  })

Now Import the KitchenService in your Component to make use of it in HTML's

Don't forget to Inject it in your component Constructor.

So yeah !!! you are the point to use your TOAST. Their are Four Type

of TOAST you can use to make the user indications what to do NEXT.

 import { KitchenService } from 'cook-toast-ng5';
 
 class MyToastComponent {
     constructor(private kitchenService: KitchenService){
             this.kitchenService.cook('Hey I am your Toast', 's');  
             this.kitchenService.cook('Hey I am your Toast', 'f');  
             this.kitchenService.cook('Hey I am your Toast', 'w');  
             this.kitchenService.cook('Hey I am your Toast', 'i');  
     }
 }

Which for which ?

  • s is for SUCCESS. SUCCESS

  • f is for FAILURE. FAIL

  • w is for WARNING. WARN

  • i is for INFORMATION. INFO

Now How it should be set in HTML ?

    <span id="toast" *cook-toast="5; left:true; top:true;"></span>

So here -

  • cook-toast is the your Directive Name.

  • Ist Param 5 is Stay Time on Screen. It is in Seconds.

  • IInd and IIIrd Param are for Position of your toast. So, just set true for two positions.

  • These are the possible postions ->

    • top:true;left:true

    • top:true;right:true

    • bottom:true;left:true

    • bottom:true;right:true

RUN-TIME Positions -

If you want to provide RUN-TIME Positions for your Cook-Toast

then just insert the object of postions like this -

    
    this.kitchenService.cook('Hey I am your Toast', 'i', {
        right: true,
        bottom: true
    });

NOTE - If you Don't Set the Position of your TOAST it will comming to By default LEFT-TOP.

Want to make Slide Animation in Toast? -

If you want to slide your Toast to the to the Vertical Sides,

just make the fourth Parameter true while you cook your toast

in RUNTIME and you can also use in your HTML Parameters.

  • For Runtime Slide Animation -
    
    this.kitchenService.cook('Hey I am your Toast', 'i', {
        right: true,
        bottom: true
    }, true);
  • For HTML Slide Animation

    <span  id="toast" *cook-toast="5; left:true; top:true; slide:true;"></span>
Contributions are Most Welcome.
Hope you Like it !