import { Component } from '@angular/core';

@Component({
  selector: 'app-root',
  template: `<h1 [style.color]="color">{{title}}</h1>
  <button (click)="setColor()">Change Color</button>`
})
export class AppComponent {
  title = 'Aplikacja działa!';
  color = "";

  setColor(){
    if(this.color==="")
      this.color="red";
    else
      this.color="";
  }
}
