akserg / ng2-toasty

Angular2 Toasty component shows growl-style alerts and messages for your app.
MIT License
283 stars 102 forks source link

Cannot read property 'next' of undefined #31

Closed xianrui closed 8 years ago

xianrui commented 8 years ago

TypeError: Cannot read property 'next' of undefined(…) toasty.service.js:158 !!! Suggestion: Seems you forget add into your html?

This code has a exception in toasty.service.ts page

// Push up a new toast item try { this.toastsSubscriber.next(toast); // **# has a exception** // If we have a onAdd function, call it here if (toastyOptions.onAdd && isFunction(toastyOptions.onAdd)) { toastyOptions.onAdd.call(this, toast); } } catch (e) { console.log(e); console.log('!!! Suggestion: Seems you forget add <ng2-toasty></ng2-toasty> into your html?'); }

But I have added the code in the html page

excuse me I should be?

akserg commented 8 years ago

Please use 2.0.0 release to confirm that issue is gone.

akserg commented 8 years ago

I'm closing this issue in respect to another one.

sanket360 commented 8 years ago

I have downloaded 2.0.0 today still getting same error...

1

toasty.service.js.zip This is toasty.service.js file I get, after using npm install ng2-toasty --save command.