moff / angular2-flash-messages

Angular 2 flash messages module
52 stars 21 forks source link

Support for Angular 6.x #42

Closed jonathan-bird closed 6 years ago

jonathan-bird commented 6 years ago

Request for support of Angular 6.x

Kens1520 commented 6 years ago

i use currently version 6 of angular and i recently use angular-flash-messages package. i installed it and add in my app Module but when i use it in component.ts as a FlashMessagesService.

import { FlashMessagesService } from 'angular2-flash-message';

but there is error occur to accept FlashMessagesServices. what can i do ?

aZolo77 commented 6 years ago

Same question

moff commented 6 years ago

@jonathan-bird , @Kens1520 , @aZolo77 Sorry for the delay, folks! I've just published version 3.0.0 with Angular 6 dependency.

aZolo77 commented 6 years ago

thats awesome and I uploadded the package, but still seeing this error: <error TS2339: Property 'show' does not exist on type 'FlashMessagesModule'>

moff commented 6 years ago

i use currently version 6 of angular and i recently use angular-flash-messages package. i installed it and add in my app Module but when i use it in component.ts as a FlashMessagesService. import { FlashMessagesService } from 'angular2-flash-message'; but there is error occur to accept FlashMessagesServices. what can i do ?

thats awesome and I uploadded the package, but still seeing this error: <error TS2339: Property 'show' does not exist on type 'FlashMessagesModule'>

@Kens1520, @aZolo77 Are those different issues? If yes, then please create separate issues. I'll take a look at it as soon as I will have time. Thank you for letting me know!

De4oult commented 2 years ago

thats awesome and I uploadded the package, but still seeing this error: <error TS2339: Property 'show' does not exist on type 'FlashMessagesModule'>

Cause you need to use "FlashMessagesService" instead of "FlashMessagesModule", the show() function is attached to the service, not to the module.

Replace string "import { FlashMessagesModule } from 'angular2-flash-messages';" to "import { FlashMessagesService } from 'angular2-flash-messages';"