diff --git a/front/src/app/app.module.ts b/front/src/app/app.module.ts
index c8e14e3..2c7096a 100644
--- a/front/src/app/app.module.ts
+++ b/front/src/app/app.module.ts
@@ -2,6 +2,7 @@
import { BrowserModule } from '@angular/platform-browser';
import { ReactiveFormsModule } from '@angular/forms';
import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';
+import { FormsModule } from '@angular/forms';
// used to create fake backend
import { fakeBackendProvider } from './_helpers';
@@ -23,7 +24,8 @@ import { AddChallangeComponent } from './addChallange';
BrowserModule,
ReactiveFormsModule,
HttpClientModule,
- appRoutingModule
+ appRoutingModule,
+ FormsModule
],
declarations: [
AppComponent,
diff --git a/front/src/app/challange/challange.component.html b/front/src/app/challange/challange.component.html
index e3a1f08..921905b 100644
--- a/front/src/app/challange/challange.component.html
+++ b/front/src/app/challange/challange.component.html
@@ -26,4 +26,27 @@
+
+
Komentarze
+
+
+ Autor
+
+
+
+
+
+
+
+
+
+
+
+
{{comment.author}}
+
{{comment.body}}
+
+
diff --git a/front/src/app/challange/challange.component.ts b/front/src/app/challange/challange.component.ts
index d1ca4f2..3b5fe57 100644
--- a/front/src/app/challange/challange.component.ts
+++ b/front/src/app/challange/challange.component.ts
@@ -5,9 +5,16 @@ import { ChallangesService } from '@/_services';
@Component({ templateUrl: 'challange.component.html' })
export class ChallangeComponent implements OnInit {
+ comments = [
+ {author: "szalony", body: "Wow, ale opcja!!!!!"},
+ {author: "krejzol", body: "Nie wierzę!!!!!"},
+ ]
challange: Challange = null
observing = false
+ author: string = '';
+ body: string = '';
+
constructor(
private route: ActivatedRoute,
private service: ChallangesService
@@ -30,4 +37,8 @@ export class ChallangeComponent implements OnInit {
this.observing = true
this.challange.numberOfObservators += 1
}
+
+ addComment() {
+ this.comments.push({author: this.author, body: this.body})
+ }
}