RiesvGeffen
RiesvGeffen

Reputation: 1589

ngStyle more properties

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

Upvotes: 0

Views: 79

Answers (1)

Shikloshi
Shikloshi

Reputation: 3811

This should work:

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

Upvotes: 3

Related Questions