moff / angular2-flash-messages

Angular 2 flash messages module
52 stars 21 forks source link

Is there a way to add multiple cssClasses? #44

Closed rohitkrishna094 closed 6 years ago

rohitkrishna094 commented 6 years ago

If I have something like this

this.flashMessage.show('You are now logged in', { cssClass: 'alert-success', timeout: 5000 });

Is there a way I can add multiple cssClasses instead of just alert-success(in this example above) directly from here without having to wrap alert-success in another css class? Maybe something like this

this.flashMessage.show('You are now logged in', { cssClass: ['alert-success', 'my-new-css'], timeout: 5000 });

Joklogh commented 6 years ago

Hi @rohitkrishna094 You can write all classes you want to apply in cssClass string. For example if i want to add btn class and btn-primary then I would write it like this : cssClass : 'btn btn-primary' Let me know if it solves your issue

rohitkrishna094 commented 6 years ago

Thanks. That worked.