Home change bootstrap class conditionally on DIV

# change bootstrap class conditionally on DIV

user7000
1#
user7000 Published in 2018-01-12 14:10:46Z
 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. 
{{message}}

Vivek Doshi
2#
Vivek Doshi Reply to 2018-01-12 14:31:56Z
 You can use this : 
...
 OR 
...

santosh singh
3#
santosh singh Reply to 2018-01-12 14:34:02Z
 You can use ngClassbinding 

Sandip Jaiswal
4#
Sandip Jaiswal Reply to 2018-01-12 14:14:52Z
 You should use ngClass. Use following code: 
 Hope it will help
 You need to login account before you can post.
Processed in 0.322858 second(s) , Gzip On .