# Ionic v2 - How to change ion-card-content background using ng-repeat

**URL:** <https://forum.ionicframework.com/t/ionic-v2-how-to-change-ion-card-content-background-using-ng-repeat/90063>\
**Category:** ionic-v3\
**Created:** [May 12, 2017, 4:00pm UTC](https://forum.ionicframework.com/t/ionic-v2-how-to-change-ion-card-content-background-using-ng-repeat/90063 "2017-05-12T16:00:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pareshinexture](https://avatars.discourse-cdn.com/v4/letter/p/34f0e0/32.png) [@pareshinexture](https://forum.ionicframework.com/u/pareshinexture)\
**Post date:** [May 12, 2017, 4:00pm UTC](https://forum.ionicframework.com/t/ionic-v2-how-to-change-ion-card-content-background-using-ng-repeat/90063/1 "2017-05-12T16:00:49Z")

</div>

I have to change color of ion-card-content using below code but did not get it.

```
 <ion-card *ngFor="let p of notes">
      <ion-card-content style="background-color: {{p.bgcolor}}">
         <div [innerHTML]="p.data"></div>
      </ion-card-content>
</ion-card>
```

---

<div class="post-metadata">

**Author:** ![rapropos](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/rapropos/32/100227_2.png) [@rapropos](https://forum.ionicframework.com/u/rapropos)\
**Post date:** [May 12, 2017, 8:31pm UTC](https://forum.ionicframework.com/t/ionic-v2-how-to-change-ion-card-content-background-using-ng-repeat/90063/2 "2017-05-12T20:31:17Z")

</div>

`[style.background-color]="p.bgcolor"`

---

<div class="post-metadata">

**Author:** ![pareshinexture](https://avatars.discourse-cdn.com/v4/letter/p/34f0e0/32.png) [@pareshinexture](https://forum.ionicframework.com/u/pareshinexture)\
**Post date:** [May 14, 2017, 9:03am UTC](https://forum.ionicframework.com/t/ionic-v2-how-to-change-ion-card-content-background-using-ng-repeat/90063/3 "2017-05-14T09:03:41Z")

</div>

Wow. Working. Thanks a lot. Where i can find?
