moff / angular2-flash-messages

Angular 2 flash messages module
52 stars 21 forks source link

Using variables in flash message template #10

Open mittelman29 opened 7 years ago

mittelman29 commented 7 years ago

Not sure if this is possible, but I'd like to use variables like below:

{{ result.result }} :: {{ result.messages }}

I could then call the service like this:

this._flashMessagesService.show();

Is there a way to make this behave this way? I'd just put the variables in the .show() args, but they are results of an observable and I can't get it to work that way.

Thx

sathwik77 commented 5 years ago

this._flashMessagesService.show(variable, { cssClass: 'alert-danger', timeout: 5000 });