0

I want to have more properties in ng-style but it won't work.

This is my code line:

<h3 ng-style="{color: titleColor; font-size: titleSize;}">Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</h3>

If I only have the {color: titleColor} then it works perfectly.

Help me to get the font-size in there aswell

pnuts
  • 58,317
  • 11
  • 87
  • 139
RiesvGeffen
  • 1,539
  • 2
  • 11
  • 29

1 Answers1

3

This should work:

<h3 ng-style="{'color': titleColor, 'font-size': titleSize}">Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</h3>
Shikloshi
  • 3,761
  • 7
  • 32
  • 58