xxxxxxxxxx
<div [ngClass]="{'message': info.priority < 10,
'warn': info.priority > 10 && info.priority < 20,
'error': info.priority > 30}">
{{info.text}}
</div>
xxxxxxxxxx
<p [ngClass]="{'red':false, 'green':true}">
Sure you understand Angular Directives!
</p>
<style>
.red{color: red}
.green{color: green}
</style>