title: change the background color dynamically in ionic 3
body: <p>Hello I wanted to know how I can change the background color, with a button and tried this without any positive results:</p>
  
  <p>what I try to do is that with a button I change the color of my background, for example from white to red</p>
  
  <p>I'm trying this way but it does not work</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;ion-header&gt;
      &lt;ion-navbar&gt;
          &lt;ion-title&gt;
              Ionic Blank
          &lt;/ion-title&gt;
      &lt;/ion-navbar&gt;
  &lt;/ion-header&gt;
  
  &lt;ion-content padding [ngClass]="{ classname:false }"&gt;
      The world is your oyster.
      &lt;p&gt;
          If you get lost, the &lt;a href="http://ionicframework.com/docs/v2"&gt;docs&lt;/a&gt; will be your guide.
      &lt;/p&gt;
  
      &lt;ion-buttons (click)="color()"&gt;
          &lt;button&gt;
          Hola
        &lt;/button&gt;
      &lt;/ion-buttons&gt;
  &lt;/ion-content&gt;
  </code></pre>
  
  <p>TS</p>
  
  <pre><code>import { Component } from '@angular/core';
  import { NavController } from 'ionic-angular';
  
  @Component({
    selector: 'page-home',
    templateUrl: 'home.html'
  })
  export class HomePage {
  
    classname = false;
    constructor(public navCtrl: NavController) {
  
    }
  
    color() {
      console.log('Hola');
      this.classname = true;
    }
  
  }
  </code></pre>
  
  <p>My SCSS.</p>
  
  <pre><code>page-home {
      .classname {
          Background: red;
      }
  }
  </code></pre>