plauzul / ng2-izitoast Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
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
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:
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.
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
Hello @plauzul.
Could you update the repository to the latest version of the plugin (1.2.0)?
Thank you.
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,
Is it possible to add the displayMode option?
At the moment there is toastOnce but it doesn't work because is deprecated
Please fix the version of 'izitoast' in package JSON to 1.2.0 or update your repo to follow 1.3.0 changes
Thanks
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?
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?
1.4.0 (Updated on Aug 6, 2018)
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.
Suggest adding the ability to set global settings, without the need to repeat applying same settings to every opening of the toast.
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'
});
}
}
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.