diff --git a/PrésentationSession1_06022025.pptx b/PrésentationSession1_06022025.pptx new file mode 100644 index 0000000..44173cc Binary files /dev/null and b/PrésentationSession1_06022025.pptx differ diff --git a/angular/src/app/about/about.component.css b/angular/src/app/about/about.component.css new file mode 100644 index 0000000..e69de29 diff --git a/angular/src/app/about/about.component.html b/angular/src/app/about/about.component.html new file mode 100644 index 0000000..98b641c --- /dev/null +++ b/angular/src/app/about/about.component.html @@ -0,0 +1,27 @@ + + +
+ + + + +
+

Liste des commentaires

+ + +
+ + +

Aucun commentaire pour le moment

+
+
\ No newline at end of file diff --git a/angular/src/app/about/about.component.spec.ts b/angular/src/app/about/about.component.spec.ts new file mode 100644 index 0000000..a84e18c --- /dev/null +++ b/angular/src/app/about/about.component.spec.ts @@ -0,0 +1,23 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { AboutComponent } from './about.component'; + +describe('AboutComponent', () => { + let component: AboutComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [AboutComponent] + }) + .compileComponents(); + + fixture = TestBed.createComponent(AboutComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/angular/src/app/about/about.component.ts b/angular/src/app/about/about.component.ts new file mode 100644 index 0000000..576c8f1 --- /dev/null +++ b/angular/src/app/about/about.component.ts @@ -0,0 +1,41 @@ +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 = 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; +} diff --git a/angular/src/app/app.component.html b/angular/src/app/app.component.html index 36093e1..896228b 100644 --- a/angular/src/app/app.component.html +++ b/angular/src/app/app.component.html @@ -1,336 +1 @@ - - - - - - - - - - - -
-
-
- -

Hello, {{ title }}

-

Congratulations! Your app is running. 🎉

-
- -
-
- @for (item of [ - { title: 'Explore the Docs', link: 'https://angular.dev' }, - { title: 'Learn with Tutorials', link: 'https://angular.dev/tutorials' }, - { title: 'CLI Docs', link: 'https://angular.dev/tools/cli' }, - { title: 'Angular Language Service', link: 'https://angular.dev/tools/language-service' }, - { title: 'Angular DevTools', link: 'https://angular.dev/tools/devtools' }, - ]; track item.title) { - - {{ item.title }} - - - - - } -
- -
-
-
- - - - - - - - - - - + \ No newline at end of file diff --git a/angular/src/app/app.module.ts b/angular/src/app/app.module.ts index b1c6c96..0173ab4 100644 --- a/angular/src/app/app.module.ts +++ b/angular/src/app/app.module.ts @@ -3,14 +3,18 @@ import { BrowserModule } from '@angular/platform-browser'; import { AppRoutingModule } from './app-routing.module'; import { AppComponent } from './app.component'; +import { AboutComponent } from './about/about.component'; +import { FormsModule } from '@angular/forms'; @NgModule({ declarations: [ - AppComponent + AppComponent, + AboutComponent ], imports: [ BrowserModule, - AppRoutingModule + AppRoutingModule, + FormsModule ], providers: [], bootstrap: [AppComponent]