import {Component} from '@angular/core';
import {BackendService} from '../backend.service';

@Component({
  selector: 'app-message',
  imports: [],
  templateUrl: './message.component.html',
  standalone: true,
  styleUrl: './message.component.css'
})
export class MessageComponent {

  message: string | undefined

  constructor(private service: BackendService) {
    service.getMessage().subscribe(body => {
      this.message = body.message;
    });
  }

}
