JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 6
  • Score
    100M100P100Q81753F
  • License MIT

Package Exports

  • art-toast

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (art-toast) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Art Toast

Art Toast is an easy-to-use library.

DEMO: coming soon

Install

npm install art-toast

font-awesome is a necessary dependency for icons

npm i font-awesome@4.7.0

Setup

1: Add font-awesome to angular.json

{
    ...
    "styles": [
        "node_modules/font-awesome/css/font-awesome.min.css"
    ]
}

2: Add the module to app.module.ts

import { ArtToastModule } from  'art-toast';

@NgModule({
declarations: [
    ...
],
imports: [
    ...,
    ArtToastModule
],
providers: [...],
})

3: Add in app.component.html

<art-toast></art-toast>

Using

import { Component } from  '@angular/core';
import { ArtToastService } from  'art-toast';

@Component({...})
export  class  AppComponent {
    constructor(private  artToastService: ArtToastService) { }
    showToast() {
        this.artToastService.success('title', 'description', {
        showButtonClose:  true,
        timer:  2000
        });
    }
}