Home change bootstrap class conditionally on DIV
Reply: 0

change bootstrap class conditionally on DIV

user463
1#
user463 Published in August 15, 2018, 8:44 pm

In my angular 4 app, I have a div which displays a message. This message should use class alert alert-success or alert alert-danger based on message shown. How I can I use one message and switch the class names.

<div class="alert alert-success" *ngIf="message.length > 0" >                                        
   <strong role="alert">{{message}}</strong>
</div> 
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.310986 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO