Skip to main content
added 97 characters in body
Source Link
musically_ut
  • 34.3k
  • 8
  • 97
  • 109

Update: Since version 1.1.5, Angular does have support for ternary operator in templates.

Angular does not have support for the ternary operator in templates. You can, however, use the poor man's ternary operator:

 ng-style="{opacity : ((currentPage == 0) && '0.4') || '1'}">   

Angular does not have support for the ternary operator in templates. You can, however, use the poor man's ternary operator:

 ng-style="{opacity : ((currentPage == 0) && '0.4') || '1'}">   

Update: Since version 1.1.5, Angular does have support for ternary operator in templates.

Angular does not have support for the ternary operator in templates. You can, however, use the poor man's ternary operator:

 ng-style="{opacity : ((currentPage == 0) && '0.4') || '1'}">   
Source Link
musically_ut
  • 34.3k
  • 8
  • 97
  • 109

Angular does not have support for the ternary operator in templates. You can, however, use the poor man's ternary operator:

 ng-style="{opacity : ((currentPage == 0) && '0.4') || '1'}">