0
 <p class="smallText">{{vehicleItem.registration}}, {{vehicleItem.colour}} {{vehicleItem.make}} {{vehicleItem.model}}</p>

I'd like to capitalize vehicle registration and model and make should be camel case

3 Answers3

1

I will suggest wrapping registration and make with a span containing different classes e.g.

<p><span class="capitalize">{{vehicleItem.registration}}, {{vehicleItem.colour}} <span class="camel-case">{{vehicleItem.make}} </span> {{vehicleItem.model}}</p>

This way you are adding "two" css rules to one element. I also recommend you achieve the camelcase style using Javascript.

Comfort Ajala
  • 36
  • 2
  • 4
0

You can write as many classes into an HTML tag as you want, thereby applying as many CSS rules as you want. Example:

<p class="smallText myclass_1 myclass_2">
Johannes
  • 64,305
  • 18
  • 73
  • 130
0

I'm not experienced with angular but you should be able to use different functions like

capitalizeFirstLetter(vehicleItem.registration)

and camelize(vehicleItem.model)

Converting any string into camel case

How do I make the first letter of a string uppercase in JavaScript?

dVeza
  • 557
  • 4
  • 12