We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi,
I have a service around the flash messages service as following:
import { Injectable } from '@angular/core'; import { FlashMessagesService } from 'angular2-flash-messages'; @Injectable() export class MessagesService { constructor(private flashMessagesService: FlashMessagesService) {} public show(message: string, cssClass: string = 'success') { this.flashMessagesService.show(message, { cssClass: cssClass, closeOnClick: true, showCloseBtn: true, timeout: 5000 }); } }
And in my component as following:
constructor( private messages: MessagesService, ){} ngOnInit() { this.messages.show('Test', 'success'); }
But when this runs I get the following error: ManagementLocationsComponent.html:1 ERROR TypeError: this.flashMessagesService.show is not a function
ManagementLocationsComponent.html:1 ERROR TypeError: this.flashMessagesService.show is not a function
Any ideas what is going wrong over here?
Kind regards, Yanick
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi,
I have a service around the flash messages service as following:
And in my component as following:
But when this runs I get the following error:
ManagementLocationsComponent.html:1 ERROR TypeError: this.flashMessagesService.show is not a function
Any ideas what is going wrong over here?
Kind regards,
Yanick
The text was updated successfully, but these errors were encountered: