Coder Social home page Coder Social logo

ng2-izitoast's People

Contributors

exlord avatar plauzul avatar rujorgensen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

ng2-izitoast's Issues

Build error with Angular 5

When implementing ng2-izitoast in an Angular 5 project, I get the following build error when running ng serve:

ERROR in ./node_modules/ng2-izitoast/index.ts
Module build failed: Error: /Users/btaylor/work/angular-apps/dz-angular/node_modules/ng2-izitoast/index.ts is not part of the compilation output. Please check the other error messages for details.
at AngularCompilerPlugin.getCompiledFile (/Users/btaylor/work/angular-apps/dz-angular/node_modules/@ngtools/webpack/src/angular_compiler_plugin.js:629:23)
at plugin.done.then (/Users/btaylor/work/angular-apps/dz-angular/node_modules/@ngtools/webpack/src/loader.js:467:39)
at
at process._tickCallback (internal/process/next_tick.js:188:7)
@ ./src/app/app.module.ts 21:0-49
@ ./src/main.ts
@ multi webpack-dev-server/client?http://0.0.0.0:0 ./src/main.ts

how to import Ng2IzitoastService into component?

constructor(private router: Router, private auth: LoginService, private toastr: ToastrService, public toast: Ng2IzitoastService) {
}

My angular vesrion is: 6.0.8
Added in app.module.ts and anhular.json following your npm documentaion.
Installation process:

image

Here, I should be able to import Ng2IzitoastService for it work in the component. How to do that? When I try this is what is says.

image

Angular 6

runnig this command ng update @angular/material, gives this error :

Package "ng2-izitoast" has an incompatible peer dependency to "@angular/core" (requires ">=5.0.0 <6.0.0" (extended), would install "7.0.0").

what does this mean and how can i fix it?

+Angular7

Cant Call Service/Function Angular Way in onClosing/OnClosed Question

Hi plauzul, thank for your awesome plugin, that helps me. but I have some problem. when I try to make this question toast.

I'm trying in OnClosing event and call my service/my function, but it does not work! the error say Cannot read property 'roleService' of undefined. and I think it's happen in any event. cause the TypeScript/Angular have different habits.

This is my code, sorry for my bad English,

image

Support option DisplayMode

Is it possible to add the displayMode option?
At the moment there is toastOnce but it doesn't work because is deprecated

Support Angular 9

I am trying to update the version of my angular project and I am getting the following error:

Package "ng2-izitoast" has an incompatible peer dependency to "@angular/core" (requires ">=5.0.0 <6.0.0" (extended), would install "9.1.2").

Could you fix this problem?

izi question buttons are not working

i tried the same question toast that i used in angular one, the buttons are not working? are they depreciated in angular 4 version of izitoast?

Disable timeout

In Angular 5 I'm getting an error when setting the timeout to false to disable the auto hide. It works but still shows an error. Probably because it expects a number but false should also work.

iziToast as service

Hello,

I try to use your angular component ng2-iziToast, but the use of component is very difficult. Why do you not implement a angular service
this is my code

import { Injectable } from '@angular/core';

const iziToast = require('izitoast/dist/js/iziToast');
require('izitoast/dist/css/iziToast.min.css');

@Injectable()
export class ToasterService {

  private toasterConfig = {
    title: 'Title',
    titleColor: '',
    message: 'Message',
    messageColor: '',
    backgroundColor: '',
    color: '',
    icon: '',
    iconText: '',
    iconColor: '',
    image: '',
    imageWidth: 50,
    zindex: 99999,
    layout: 1,
    close: true,
    rtl: false,
    position: 'bottomRight',
    target: '',
    targetFirst: true,
    timeout: 5000,
    drag: true,
    pauseOnHover: true,
    resetOnHover: false,
    progressBar: true,
    progressBarColor: '',
    animateInside: true,
    buttons: {},
    transitionIn: 'fadeInUp',
    transitionOut: 'fadeOut',
    transitionInMobile: 'fadeInUp',
    transitionOutMobile: 'fadeOutDown'
  };


  public showToaster(config: any) {
    const iziToastConfig = Object.assign({}, this.toasterConfig, config);
    iziToast.show(iziToastConfig);
  }
}

then you call it

export class AppComponent implements OnInit {

  constructor(private toastSvc: ToasterService) { }

  ngOnInit() {
    this.toastSvc.showToaster({
      title: 'Bonjour',
      message: 'Bienvenue sur l\'extranet'
    });
  }
}

1.0.1 fail on angular 4

Hi, you update your repo yesterday, to version 1.0.1 but you make major change so please update to version 2.0.0 for Angular 5 and stay at 1.0.0 for Angular 2 & 4

Thank you

Ng2IzitoastService

npm install ng2-izitoast --save

NPM does not yet include the service file.

image

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.