Button color adjustment by data


I have a json database.I want the different Id to have different colors.If Id = 1, get the button blue.If Id = 0, get the button red.Do you have any idea how I can do it.


           Ionic Blank

     <ion-content padding>
         <ion-list >
           <ion-item *ngFor="let item of getdata">
             {{item.name}} {{item.id}}
         <button ion-button round class="ilanbtnn" >{{item.surname}</button> 


import { Component } from '@angular/core';
     import { NavController } from 'ionic-angular';
     import {Http,Response} from '@angular/http';
     import {DataService} from '../../app/dataapi/data-api.service';

    selector: 'page-home',
     templateUrl: 'home.html'
     export class HomePage {

      getdata : any;

      constructor(public navCtrl: NavController ,public http:Http,public 
     dataApi:DataService) {


     ionViewDidLoad() { 

       this.dataApi.getVideo().then(data =>
        this.getdata = data);   


<button [style.background-color]="item.id ? 'blue' : 'red'">