41 lines
843 B
TypeScript
41 lines
843 B
TypeScript
import { Component, OnInit } from '@angular/core';
|
|
|
|
@Component({
|
|
selector: 'app-about',
|
|
standalone: false,
|
|
templateUrl: './about.component.html',
|
|
styleUrl: './about.component.css'
|
|
})
|
|
export class AboutComponent implements OnInit {
|
|
|
|
info: Info = new Info();
|
|
comments: Array<Comment> = [];
|
|
comment: Comment = new Comment();
|
|
newComment: boolean = false;
|
|
|
|
constructor() { }
|
|
|
|
ngOnInit(): void {}
|
|
|
|
addComment() {
|
|
if (this.comment.message) {
|
|
this.comment.date = new Date();
|
|
this.comments.push({
|
|
message: this.comment.message,
|
|
date: this.comment.date
|
|
});
|
|
this.comment.message = '';
|
|
}
|
|
}
|
|
}
|
|
|
|
export class Info {
|
|
name: string = "Test";
|
|
email: string = "test@mail.com";
|
|
phone: string= "000000000";
|
|
}
|
|
|
|
export class Comment {
|
|
message: string = '';
|
|
date: Date | null = null;
|
|
}
|