Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR HTML

angular conditionally applying class usingn ngclass directive

<p [ngClass]="{'red':false, 'green':true}">
  Sure you understand Angular Directives!
</p>

<style>
  .red{color: red}
  .green{color: green}
</style>
Source by www.datarmatics.com #
 
PREVIOUS NEXT
Tagged: #angular #conditionally #applying #class #usingn #ngclass #directive
ADD COMMENT
Topic
Name
1+7 =