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/README.md b/README.md index 76d79df..e69de29 100644 --- a/README.md +++ b/README.md @@ -1,59 +0,0 @@ -# Angular - -This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 19.1.6. - -## Development server - -To start a local development server, run: - -```bash -ng serve -``` - -Once the server is running, open your browser and navigate to `http://localhost/`. The application will automatically reload whenever you modify any of the source files. - -## Code scaffolding - -Angular CLI includes powerful code scaffolding tools. To generate a new component, run: - -```bash -ng generate component component-name -``` - -For a complete list of available schematics (such as `components`, `directives`, or `pipes`), run: - -```bash -ng generate --help -``` - -## Building - -To build the project run: - -```bash -ng build -``` - -This will compile your project and store the build artifacts in the `dist/` directory. By default, the production build optimizes your application for performance and speed. - -## Running unit tests - -To execute unit tests with the [Karma](https://karma-runner.github.io) test runner, use the following command: - -```bash -ng test -``` - -## Running end-to-end tests - -For end-to-end (e2e) testing, run: - -```bash -ng e2e -``` - -Angular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs. - -## Additional Resources - -For more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page. diff --git a/.editorconfig b/angular/.editorconfig similarity index 100% rename from .editorconfig rename to angular/.editorconfig diff --git a/.gitignore b/angular/.gitignore similarity index 100% rename from .gitignore rename to angular/.gitignore diff --git a/.vscode/extensions.json b/angular/.vscode/extensions.json similarity index 100% rename from .vscode/extensions.json rename to angular/.vscode/extensions.json diff --git a/.vscode/launch.json b/angular/.vscode/launch.json similarity index 100% rename from .vscode/launch.json rename to angular/.vscode/launch.json diff --git a/.vscode/tasks.json b/angular/.vscode/tasks.json similarity index 100% rename from .vscode/tasks.json rename to angular/.vscode/tasks.json diff --git a/angular/README.md b/angular/README.md new file mode 100644 index 0000000..52a4e60 --- /dev/null +++ b/angular/README.md @@ -0,0 +1,59 @@ +# Angular + +This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 19.1.6. + +## Development server + +To start a local development server, run: + +```bash +ng serve +``` + +Once the server is running, open your browser and navigate to `http://localhost:4200/`. The application will automatically reload whenever you modify any of the source files. + +## Code scaffolding + +Angular CLI includes powerful code scaffolding tools. To generate a new component, run: + +```bash +ng generate component component-name +``` + +For a complete list of available schematics (such as `components`, `directives`, or `pipes`), run: + +```bash +ng generate --help +``` + +## Building + +To build the project run: + +```bash +ng build +``` + +This will compile your project and store the build artifacts in the `dist/` directory. By default, the production build optimizes your application for performance and speed. + +## Running unit tests + +To execute unit tests with the [Karma](https://karma-runner.github.io) test runner, use the following command: + +```bash +ng test +``` + +## Running end-to-end tests + +For end-to-end (e2e) testing, run: + +```bash +ng e2e +``` + +Angular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs. + +## Additional Resources + +For more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page. diff --git a/angular.json b/angular/angular.json similarity index 96% rename from angular.json rename to angular/angular.json index 893c76f..a87b644 100644 --- a/angular.json +++ b/angular/angular.json @@ -40,9 +40,7 @@ "src/styles.css", "node_modules/bootstrap/dist/css/bootstrap.min.css" ], - "scripts": [ - "node_modules/bootstrap/dist/js/bootstrap.bundle.min.js" - ] + "scripts": [] }, "configurations": { "production": { diff --git a/package-lock.json b/angular/package-lock.json similarity index 100% rename from package-lock.json rename to angular/package-lock.json diff --git a/package.json b/angular/package.json similarity index 100% rename from package.json rename to angular/package.json diff --git a/public/favicon.ico b/angular/public/favicon.ico similarity index 100% rename from public/favicon.ico rename to angular/public/favicon.ico diff --git a/src/app/about/about.component.css b/angular/src/app/about/about.component.css similarity index 100% rename from src/app/about/about.component.css rename to angular/src/app/about/about.component.css diff --git a/angular/src/app/about/about.component.html b/angular/src/app/about/about.component.html new file mode 100644 index 0000000..86a08c7 --- /dev/null +++ b/angular/src/app/about/about.component.html @@ -0,0 +1,37 @@ +
+ + + + +
+
+ Message + + +
+
+ + +
+

Liste des commentaires

+
    +
  1. +
    +
    {{ comment.message }}
    +
    + + {{ comment.date | date:'dd/MM/yyyy' }} +
  2. +
+
+ + + +

Aucun commentaire pour le moment

+
+
diff --git a/src/app/about/about.component.spec.ts b/angular/src/app/about/about.component.spec.ts similarity index 100% rename from src/app/about/about.component.spec.ts rename to angular/src/app/about/about.component.spec.ts diff --git a/angular/src/app/about/about.component.ts b/angular/src/app/about/about.component.ts new file mode 100644 index 0000000..d9193b1 --- /dev/null +++ b/angular/src/app/about/about.component.ts @@ -0,0 +1,42 @@ +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/src/app/account/account.component.css b/angular/src/app/account/account.component.css similarity index 100% rename from src/app/account/account.component.css rename to angular/src/app/account/account.component.css diff --git a/angular/src/app/account/account.component.html b/angular/src/app/account/account.component.html new file mode 100644 index 0000000..67e00d1 --- /dev/null +++ b/angular/src/app/account/account.component.html @@ -0,0 +1,67 @@ +
+ + +
+
+
+

Ajouter vos informations

+ +
+
+
+ +
+ + +
+ +
+ + +
+ +
+ +
+
+
+ + @ + +
+
+ + @edu.igensia.com +
+
+ Adresse + +
+ +
+
+
+ + +
+

Liste des commentaires

+
    +
  • +
    +
    {{ info.nameLast }} {{ info.nameFirst }}
    + +
    {{ info.address }}
    +
    +
    + {{ info.gender }} + {{ info.date | date:'dd/MM/yyyy' }} +
    +
  • +
+
+ + + +

Aucun commentaire pour le moment

+
+
diff --git a/src/app/account/account.component.spec.ts b/angular/src/app/account/account.component.spec.ts similarity index 100% rename from src/app/account/account.component.spec.ts rename to angular/src/app/account/account.component.spec.ts diff --git a/angular/src/app/account/account.component.ts b/angular/src/app/account/account.component.ts new file mode 100644 index 0000000..efb49a6 --- /dev/null +++ b/angular/src/app/account/account.component.ts @@ -0,0 +1,51 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'app-account', + standalone: false, + templateUrl: './account.component.html', + styleUrl: './account.component.css' +}) + +export class AccountComponent { + info: Info = new Info(); + infos: Array = []; + newInfo: boolean = false; + + constructor() {} + ngOnInit(): void {} + + addInfo() { + if (this.info.gender && this.info.nameFirst && this.info.nameLast && this.info.email && this.info.address) { + this.info.date = new Date(); + this.info.nameFirst = this.info.nameFirst.charAt(0).toUpperCase() + this.info.nameFirst.slice(1).toLowerCase() + this.infos.push({ + gender: this.info.gender, + nameFirst: this.info.nameFirst, + nameLast: this.info.nameLast.toUpperCase(), + email: this.info.email.toLowerCase() + '@edu.igensia.com', + address: this.info.address, + date: this.info.date + }) + this.info.nameFirst = ''; + this.info.nameLast = ''; + this.info.email = ''; + this.info.address = ''; + this.info.gender = ''; + } + } + + updateGender() { + // console.log("Le genre sélectionné est :", this.info.gender); + } + +} + +export class Info { + gender: string = ''; + nameFirst: string = ''; + nameLast: string = ''; + email: string = ''; + address: string= ''; + date: Date | null = null; +} diff --git a/src/app/app-routing.module.ts b/angular/src/app/app-routing.module.ts similarity index 85% rename from src/app/app-routing.module.ts rename to angular/src/app/app-routing.module.ts index fda40d9..09f67a5 100644 --- a/src/app/app-routing.module.ts +++ b/angular/src/app/app-routing.module.ts @@ -2,14 +2,12 @@ import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; import { HomeComponent } from './home/home.component'; import { AboutComponent } from './about/about.component'; -import { InfoComponent } from './info/info.component'; import { ContactsComponent } from './contacts/contacts.component'; const routes: Routes = [ { path: '', component: HomeComponent }, { path: 'home', component: HomeComponent }, { path: 'about', component: AboutComponent }, - { path: 'info', component: InfoComponent }, { path: 'contacts', component: ContactsComponent }, ]; diff --git a/src/app/app.component.css b/angular/src/app/app.component.css similarity index 100% rename from src/app/app.component.css rename to angular/src/app/app.component.css diff --git a/src/app/app.component.html b/angular/src/app/app.component.html similarity index 100% rename from src/app/app.component.html rename to angular/src/app/app.component.html diff --git a/src/app/app.component.spec.ts b/angular/src/app/app.component.spec.ts similarity index 100% rename from src/app/app.component.spec.ts rename to angular/src/app/app.component.spec.ts diff --git a/src/app/app.component.ts b/angular/src/app/app.component.ts similarity index 100% rename from src/app/app.component.ts rename to angular/src/app/app.component.ts diff --git a/src/app/app.module.ts b/angular/src/app/app.module.ts similarity index 79% rename from src/app/app.module.ts rename to angular/src/app/app.module.ts index 0c639e7..679a4ef 100644 --- a/src/app/app.module.ts +++ b/angular/src/app/app.module.ts @@ -4,12 +4,11 @@ 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, ReactiveFormsModule } from '@angular/forms'; +import { FormsModule } from '@angular/forms'; import { ContactsComponent } from './contacts/contacts.component'; import { HomeComponent } from './home/home.component'; import { NavBarComponent } from './nav-bar/nav-bar.component'; import { AccountComponent } from './account/account.component'; -import { InfoComponent } from './info/info.component'; @NgModule({ declarations: [ @@ -18,14 +17,12 @@ import { InfoComponent } from './info/info.component'; ContactsComponent, HomeComponent, NavBarComponent, - AccountComponent, - InfoComponent + AccountComponent ], imports: [ BrowserModule, AppRoutingModule, - FormsModule, - ReactiveFormsModule + FormsModule ], providers: [], bootstrap: [AppComponent] diff --git a/src/app/contacts/contacts.component.css b/angular/src/app/contacts/contacts.component.css similarity index 100% rename from src/app/contacts/contacts.component.css rename to angular/src/app/contacts/contacts.component.css diff --git a/src/app/contacts/contacts.component.html b/angular/src/app/contacts/contacts.component.html similarity index 100% rename from src/app/contacts/contacts.component.html rename to angular/src/app/contacts/contacts.component.html diff --git a/src/app/contacts/contacts.component.spec.ts b/angular/src/app/contacts/contacts.component.spec.ts similarity index 100% rename from src/app/contacts/contacts.component.spec.ts rename to angular/src/app/contacts/contacts.component.spec.ts diff --git a/src/app/contacts/contacts.component.ts b/angular/src/app/contacts/contacts.component.ts similarity index 100% rename from src/app/contacts/contacts.component.ts rename to angular/src/app/contacts/contacts.component.ts diff --git a/src/app/home/home.component.css b/angular/src/app/home/home.component.css similarity index 100% rename from src/app/home/home.component.css rename to angular/src/app/home/home.component.css diff --git a/src/app/home/home.component.html b/angular/src/app/home/home.component.html similarity index 80% rename from src/app/home/home.component.html rename to angular/src/app/home/home.component.html index 67aa794..039e616 100644 --- a/src/app/home/home.component.html +++ b/angular/src/app/home/home.component.html @@ -1,6 +1,6 @@
-

Bienvenue à la formation Angular

+

Bienvenue à la formation AngularJS

About diff --git a/src/app/home/home.component.spec.ts b/angular/src/app/home/home.component.spec.ts similarity index 100% rename from src/app/home/home.component.spec.ts rename to angular/src/app/home/home.component.spec.ts diff --git a/src/app/home/home.component.ts b/angular/src/app/home/home.component.ts similarity index 100% rename from src/app/home/home.component.ts rename to angular/src/app/home/home.component.ts diff --git a/src/app/nav-bar/nav-bar.component.css b/angular/src/app/nav-bar/nav-bar.component.css similarity index 100% rename from src/app/nav-bar/nav-bar.component.css rename to angular/src/app/nav-bar/nav-bar.component.css diff --git a/src/app/nav-bar/nav-bar.component.html b/angular/src/app/nav-bar/nav-bar.component.html similarity index 82% rename from src/app/nav-bar/nav-bar.component.html rename to angular/src/app/nav-bar/nav-bar.component.html index 80dab51..3cc1c37 100644 --- a/src/app/nav-bar/nav-bar.component.html +++ b/angular/src/app/nav-bar/nav-bar.component.html @@ -1,7 +1,7 @@