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 91% rename from angular.json rename to angular/angular.json index 893c76f..61b95fe 100644 --- a/angular.json +++ b/angular/angular.json @@ -37,12 +37,9 @@ } ], "styles": [ - "src/styles.css", - "node_modules/bootstrap/dist/css/bootstrap.min.css" + "src/styles.css" ], - "scripts": [ - "node_modules/bootstrap/dist/js/bootstrap.bundle.min.js" - ] + "scripts": [] }, "configurations": { "production": { @@ -69,9 +66,6 @@ "defaultConfiguration": "production" }, "serve": { - "options": { - "port": 80 - }, "builder": "@angular-devkit/build-angular:dev-server", "configurations": { "production": { diff --git a/package-lock.json b/angular/package-lock.json similarity index 99% rename from package-lock.json rename to angular/package-lock.json index b383da2..66ad6a2 100644 --- a/package-lock.json +++ b/angular/package-lock.json @@ -16,7 +16,6 @@ "@angular/platform-browser": "^19.1.0", "@angular/platform-browser-dynamic": "^19.1.0", "@angular/router": "^19.1.0", - "bootstrap": "^5.3.3", "rxjs": "~7.8.0", "tslib": "^2.3.0", "zone.js": "~0.15.0" @@ -4924,17 +4923,6 @@ "node": ">=14" } }, - "node_modules/@popperjs/core": { - "version": "2.11.8", - "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz", - "integrity": "sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==", - "license": "MIT", - "peer": true, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/popperjs" - } - }, "node_modules/@rollup/rollup-android-arm-eabi": { "version": "4.34.8", "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.34.8.tgz", @@ -6326,25 +6314,6 @@ "dev": true, "license": "ISC" }, - "node_modules/bootstrap": { - "version": "5.3.3", - "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-5.3.3.tgz", - "integrity": "sha512-8HLCdWgyoMguSO9o+aH+iuZ+aht+mzW0u3HIMzVu7Srrpv7EBBxTnrFlSCskwdY1+EOFQSm7uMJhNQHkdPcmjg==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/twbs" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/bootstrap" - } - ], - "license": "MIT", - "peerDependencies": { - "@popperjs/core": "^2.11.8" - } - }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", diff --git a/package.json b/angular/package.json similarity index 97% rename from package.json rename to angular/package.json index 0300e6a..9b43c03 100644 --- a/package.json +++ b/angular/package.json @@ -18,7 +18,6 @@ "@angular/platform-browser": "^19.1.0", "@angular/platform-browser-dynamic": "^19.1.0", "@angular/router": "^19.1.0", - "bootstrap": "^5.3.3", "rxjs": "~7.8.0", "tslib": "^2.3.0", "zone.js": "~0.15.0" 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/angular/src/app/app-routing.module.ts b/angular/src/app/app-routing.module.ts new file mode 100644 index 0000000..0297262 --- /dev/null +++ b/angular/src/app/app-routing.module.ts @@ -0,0 +1,10 @@ +import { NgModule } from '@angular/core'; +import { RouterModule, Routes } from '@angular/router'; + +const routes: Routes = []; + +@NgModule({ + imports: [RouterModule.forRoot(routes)], + exports: [RouterModule] +}) +export class AppRoutingModule { } 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/angular/src/app/app.component.html b/angular/src/app/app.component.html new file mode 100644 index 0000000..36093e1 --- /dev/null +++ b/angular/src/app/app.component.html @@ -0,0 +1,336 @@ + + + + + + + + + + + +
+
+
+ +

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 }} + + + + + } +
+ +
+
+
+ + + + + + + + + + + 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 90% rename from src/app/app.component.ts rename to angular/src/app/app.component.ts index 677dbce..02d0eac 100644 --- a/src/app/app.component.ts +++ b/angular/src/app/app.component.ts @@ -7,5 +7,5 @@ import { Component } from '@angular/core'; styleUrl: './app.component.css' }) export class AppComponent { - title = 'AngularJS'; + title = 'angular'; } diff --git a/angular/src/app/app.module.ts b/angular/src/app/app.module.ts new file mode 100644 index 0000000..b1c6c96 --- /dev/null +++ b/angular/src/app/app.module.ts @@ -0,0 +1,18 @@ +import { NgModule } from '@angular/core'; +import { BrowserModule } from '@angular/platform-browser'; + +import { AppRoutingModule } from './app-routing.module'; +import { AppComponent } from './app.component'; + +@NgModule({ + declarations: [ + AppComponent + ], + imports: [ + BrowserModule, + AppRoutingModule + ], + providers: [], + bootstrap: [AppComponent] +}) +export class AppModule { } diff --git a/src/index.html b/angular/src/index.html similarity index 100% rename from src/index.html rename to angular/src/index.html diff --git a/src/main.ts b/angular/src/main.ts similarity index 100% rename from src/main.ts rename to angular/src/main.ts diff --git a/angular/src/styles.css b/angular/src/styles.css new file mode 100644 index 0000000..90d4ee0 --- /dev/null +++ b/angular/src/styles.css @@ -0,0 +1 @@ +/* You can add global styles to this file, and also import other style files */ diff --git a/tsconfig.app.json b/angular/tsconfig.app.json similarity index 100% rename from tsconfig.app.json rename to angular/tsconfig.app.json diff --git a/tsconfig.json b/angular/tsconfig.json similarity index 100% rename from tsconfig.json rename to angular/tsconfig.json diff --git a/tsconfig.spec.json b/angular/tsconfig.spec.json similarity index 100% rename from tsconfig.spec.json rename to angular/tsconfig.spec.json diff --git a/src/app/about/about.component.css b/src/app/about/about.component.css deleted file mode 100644 index e69de29..0000000 diff --git a/src/app/about/about.component.html b/src/app/about/about.component.html deleted file mode 100644 index b191ce3..0000000 --- a/src/app/about/about.component.html +++ /dev/null @@ -1,68 +0,0 @@ -
- - - - -
-
-
- Message - - -
-
-
- - -
-

Liste des commentaires

-
-
-
-
{{ msg.user }}
-
{{ msg.message }}
-
- - {{ msg.date | date:'dd/MM/yyyy' }} - -
-
-
-
-
-
-
-
{{ msg.user }}
-
{{ msg.message }}
-
- - {{ msg.date | date:'dd/MM/yyyy' }} - -
-
-
- - - -

Aucun commentaire pour le moment

-
-
diff --git a/src/app/about/about.component.spec.ts b/src/app/about/about.component.spec.ts deleted file mode 100644 index a84e18c..0000000 --- a/src/app/about/about.component.spec.ts +++ /dev/null @@ -1,23 +0,0 @@ -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/src/app/about/about.component.ts b/src/app/about/about.component.ts deleted file mode 100644 index b770537..0000000 --- a/src/app/about/about.component.ts +++ /dev/null @@ -1,72 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { FormBuilder, FormGroup, Validators } from '@angular/forms'; -import { InfoService } from '../services/info.service'; -import { MessageService } from '../services/message.service'; - -@Component({ - selector: 'app-about', - standalone: false, - templateUrl: './about.component.html', - styleUrls: ['./about.component.css'] -}) - -export class AboutComponent implements OnInit { - messageForm: FormGroup; - - infos: Info[] = []; - info: Info = new Info(); - commentsAll: Comment[] = []; - - - comments: Comment[] = []; - comment: Comment = new Comment(); - newComment: boolean = false; - - constructor(private fb: FormBuilder, private infoService: InfoService, private messageService: MessageService) { - this.messageForm = this.fb.group({ - message: ['', [Validators.required, Validators.minLength(3)]], - }); - } - - ngOnInit() { - this.infos = this.infoService.getInfos(); - this.info = this.infos.length > 0 ? this.infos[this.infos.length - 1] : new Info(); - - this.commentsAll = this.messageService.getMessage().slice().reverse(); - this.comment = this.commentsAll.length > 0 ? this.commentsAll[0] : new Comment(); - } - - addComment() { - if (this.messageForm.valid) { - const formData = this.messageForm.value; - - const user = this.info.gender + this.info.nameLast + ' ' + this.info.nameFirst; - - const newComment = { - ...formData, - user: user, - date: new Date() - }; - - this.comments.push(newComment); - this.messageService.addMessage(newComment); - - this.messageForm.reset(); - } - } -} - -export class Info { - gender: string = 'Mister.'; - nameLast: string = 'Inconnu'; - nameFirst: string = 'PASLA'; - email: string = 'inconnu.pasla@edu.igensia.com'; - address: string = '0 rue d\'inconnu'; - codePostal: number = 1234; -} - -export class Comment { - user: string = ''; - message: string = ''; - date: Date | null = null; -} diff --git a/src/app/account/account.component.css b/src/app/account/account.component.css deleted file mode 100644 index e69de29..0000000 diff --git a/src/app/account/account.component.html b/src/app/account/account.component.html deleted file mode 100644 index f61c57d..0000000 --- a/src/app/account/account.component.html +++ /dev/null @@ -1,124 +0,0 @@ -
- - -
-
-
-

Ajouter vos informations

- -
- - -
-
-
- -
- - -
- -
- - -
- -
- -
-
- - - -
- - — - -
-
- - - - - -
- - -
- - @edu.igensia.com -
- - - -
- - — - -
-
- - - -
- - - -
-
- - - - -
-
-
-
- - -
-

Liste des informations

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

Aucune information pour le moment

-
-
diff --git a/src/app/account/account.component.spec.ts b/src/app/account/account.component.spec.ts deleted file mode 100644 index 257b01d..0000000 --- a/src/app/account/account.component.spec.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { ComponentFixture, TestBed } from '@angular/core/testing'; - -import { AccountComponent } from './account.component'; - -describe('AccountComponent', () => { - let component: AccountComponent; - let fixture: ComponentFixture; - - beforeEach(async () => { - await TestBed.configureTestingModule({ - declarations: [AccountComponent] - }) - .compileComponents(); - - fixture = TestBed.createComponent(AccountComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/account/account.component.ts b/src/app/account/account.component.ts deleted file mode 100644 index 5125f94..0000000 --- a/src/app/account/account.component.ts +++ /dev/null @@ -1,49 +0,0 @@ -import { Component } from '@angular/core'; -import { FormBuilder, FormGroup, Validators } from '@angular/forms'; -import { InfoService } from '../services/info.service'; - -@Component({ - selector: 'app-account', - standalone: false, - templateUrl: './account.component.html', - styleUrl: './account.component.css' -}) - -export class AccountComponent { - infoForm: FormGroup; - infos: any[] = []; - - constructor(private fb: FormBuilder, private infoService: InfoService) { - this.infoForm = this.fb.group({ - gender: ['', Validators.required], - nameLast: ['', [Validators.required, Validators.minLength(3)]], - nameFirst: ['', [Validators.required, Validators.minLength(3)]], - email: ['', [Validators.required, Validators.pattern(/^[a-zA-Z0-9._%+-]+$/)]], - address: ['', [Validators.required, Validators.minLength(10)]], - codePostal: ['', [Validators.required, Validators.minLength(4), Validators.pattern(/^\d+$/)]], - }); - } - - addInfo() { - if (this.infoForm.valid) { - const formData = this.infoForm.value; - - const email = formData.email.toLowerCase(); - const fullEmail = `${email}@edu.igensia.com`; - const nameLast = formData.nameLast.toUpperCase(); - const nameFirst = formData.nameFirst.charAt(0).toUpperCase() + formData.nameFirst.slice(1).toLowerCase(); - - const newInfo = { - ...formData, - nameLast: nameLast, - nameFirst: nameFirst, - email: fullEmail, - date: new Date() - }; - - this.infos.push(newInfo); - this.infoService.addInfo(newInfo); - this.infoForm.reset(); - } - } -} diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts deleted file mode 100644 index fda40d9..0000000 --- a/src/app/app-routing.module.ts +++ /dev/null @@ -1,20 +0,0 @@ -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 }, -]; - -@NgModule({ - imports: [RouterModule.forRoot(routes)], - exports: [RouterModule] -}) -export class AppRoutingModule { } diff --git a/src/app/app.component.html b/src/app/app.component.html deleted file mode 100644 index 9a8d940..0000000 --- a/src/app/app.component.html +++ /dev/null @@ -1,4 +0,0 @@ - -
- -
\ No newline at end of file diff --git a/src/app/app.module.ts b/src/app/app.module.ts deleted file mode 100644 index 0c639e7..0000000 --- a/src/app/app.module.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { NgModule } from '@angular/core'; -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 { 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: [ - AppComponent, - AboutComponent, - ContactsComponent, - HomeComponent, - NavBarComponent, - AccountComponent, - InfoComponent - ], - imports: [ - BrowserModule, - AppRoutingModule, - FormsModule, - ReactiveFormsModule - ], - providers: [], - bootstrap: [AppComponent] -}) -export class AppModule { } diff --git a/src/app/contacts/contacts.component.css b/src/app/contacts/contacts.component.css deleted file mode 100644 index e69de29..0000000 diff --git a/src/app/contacts/contacts.component.html b/src/app/contacts/contacts.component.html deleted file mode 100644 index e400718..0000000 --- a/src/app/contacts/contacts.component.html +++ /dev/null @@ -1 +0,0 @@ -

contacts works!

diff --git a/src/app/contacts/contacts.component.spec.ts b/src/app/contacts/contacts.component.spec.ts deleted file mode 100644 index bbfdce5..0000000 --- a/src/app/contacts/contacts.component.spec.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { ComponentFixture, TestBed } from '@angular/core/testing'; - -import { ContactsComponent } from './contacts.component'; - -describe('ContactsComponent', () => { - let component: ContactsComponent; - let fixture: ComponentFixture; - - beforeEach(async () => { - await TestBed.configureTestingModule({ - declarations: [ContactsComponent] - }) - .compileComponents(); - - fixture = TestBed.createComponent(ContactsComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/contacts/contacts.component.ts b/src/app/contacts/contacts.component.ts deleted file mode 100644 index c55fdcf..0000000 --- a/src/app/contacts/contacts.component.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector: 'app-contacts', - standalone: false, - templateUrl: './contacts.component.html', - styleUrl: './contacts.component.css' -}) -export class ContactsComponent { - -} diff --git a/src/app/home/home.component.css b/src/app/home/home.component.css deleted file mode 100644 index e69de29..0000000 diff --git a/src/app/home/home.component.html b/src/app/home/home.component.html deleted file mode 100644 index 67aa794..0000000 --- a/src/app/home/home.component.html +++ /dev/null @@ -1,11 +0,0 @@ - -
-

Bienvenue Ă  la formation Angular

- -
- About - Contacts -
-
- - \ No newline at end of file diff --git a/src/app/home/home.component.spec.ts b/src/app/home/home.component.spec.ts deleted file mode 100644 index 545a43d..0000000 --- a/src/app/home/home.component.spec.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { ComponentFixture, TestBed } from '@angular/core/testing'; - -import { HomeComponent } from './home.component'; - -describe('HomeComponent', () => { - let component: HomeComponent; - let fixture: ComponentFixture; - - beforeEach(async () => { - await TestBed.configureTestingModule({ - declarations: [HomeComponent] - }) - .compileComponents(); - - fixture = TestBed.createComponent(HomeComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/home/home.component.ts b/src/app/home/home.component.ts deleted file mode 100644 index 906862d..0000000 --- a/src/app/home/home.component.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector: 'app-home', - standalone: false, - templateUrl: './home.component.html', - styleUrl: './home.component.css' -}) -export class HomeComponent { - -} diff --git a/src/app/info/info.component.css b/src/app/info/info.component.css deleted file mode 100644 index e69de29..0000000 diff --git a/src/app/info/info.component.html b/src/app/info/info.component.html deleted file mode 100644 index 404172c..0000000 --- a/src/app/info/info.component.html +++ /dev/null @@ -1,14 +0,0 @@ -
- -
    -
  • -
    - Informations de {{ info.gender }}{{ info.nameLast }} - {{ info.date | date:'dd/MM/yyyy' }} -
    -
  • -
  • {{ info.gender }}{{ info.nameLast }} {{info.nameFirst}}
  • -
  • {{ info.email }}
  • -
  • {{ info.address }}, {{ info.codePostal }}
  • -
-
\ No newline at end of file diff --git a/src/app/info/info.component.spec.ts b/src/app/info/info.component.spec.ts deleted file mode 100644 index 759896e..0000000 --- a/src/app/info/info.component.spec.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { ComponentFixture, TestBed } from '@angular/core/testing'; - -import { InfoComponent } from './info.component'; - -describe('InfoComponent', () => { - let component: InfoComponent; - let fixture: ComponentFixture; - - beforeEach(async () => { - await TestBed.configureTestingModule({ - declarations: [InfoComponent] - }) - .compileComponents(); - - fixture = TestBed.createComponent(InfoComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/info/info.component.ts b/src/app/info/info.component.ts deleted file mode 100644 index a7f7af3..0000000 --- a/src/app/info/info.component.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { Component } from '@angular/core'; -import { InfoService } from '../services/info.service'; - -@Component({ - selector: 'app-info', - standalone: false, - templateUrl: './info.component.html', - styleUrl: './info.component.css' -}) -export class InfoComponent { - infos: any[] = []; - - constructor(private infoService: InfoService) {} - - ngOnInit() { - this.infos = this.infoService.getInfos().slice().reverse(); - } -} diff --git a/src/app/nav-bar/nav-bar.component.css b/src/app/nav-bar/nav-bar.component.css deleted file mode 100644 index e69de29..0000000 diff --git a/src/app/nav-bar/nav-bar.component.html b/src/app/nav-bar/nav-bar.component.html deleted file mode 100644 index 80dab51..0000000 --- a/src/app/nav-bar/nav-bar.component.html +++ /dev/null @@ -1,32 +0,0 @@ - - \ No newline at end of file diff --git a/src/app/nav-bar/nav-bar.component.spec.ts b/src/app/nav-bar/nav-bar.component.spec.ts deleted file mode 100644 index 63b97ff..0000000 --- a/src/app/nav-bar/nav-bar.component.spec.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { ComponentFixture, TestBed } from '@angular/core/testing'; - -import { NavBarComponent } from './nav-bar.component'; - -describe('NavBarComponent', () => { - let component: NavBarComponent; - let fixture: ComponentFixture; - - beforeEach(async () => { - await TestBed.configureTestingModule({ - declarations: [NavBarComponent] - }) - .compileComponents(); - - fixture = TestBed.createComponent(NavBarComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/nav-bar/nav-bar.component.ts b/src/app/nav-bar/nav-bar.component.ts deleted file mode 100644 index a1e7892..0000000 --- a/src/app/nav-bar/nav-bar.component.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { Component } from '@angular/core'; -import { Router } from '@angular/router'; - -@Component({ - selector: 'app-nav-bar', - standalone: false, - templateUrl: './nav-bar.component.html', - styleUrl: './nav-bar.component.css' -}) -export class NavBarComponent { - constructor(private router: Router) {} - - isHomeActive(): boolean { - return this.router.url === '/' || this.router.url === '/home'; - } - - isHomeActiveBool(): boolean { - if (this.router.url != '/home') { - return true - } else { - return false - } - } -} diff --git a/src/app/services/info.service.spec.ts b/src/app/services/info.service.spec.ts deleted file mode 100644 index 0b18632..0000000 --- a/src/app/services/info.service.spec.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { TestBed } from '@angular/core/testing'; - -import { InfoService } from './info.service'; - -describe('InfoService', () => { - let service: InfoService; - - beforeEach(() => { - TestBed.configureTestingModule({}); - service = TestBed.inject(InfoService); - }); - - it('should be created', () => { - expect(service).toBeTruthy(); - }); -}); diff --git a/src/app/services/info.service.ts b/src/app/services/info.service.ts deleted file mode 100644 index 316bbcd..0000000 --- a/src/app/services/info.service.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { Injectable } from '@angular/core'; - -@Injectable({ - providedIn: 'root' -}) -export class InfoService { - private infos: any[] = []; - - constructor() { } - - // Ajouter une info - addInfo(info: any) { - this.infos.push(info); - } - - // Récupérer toutes les infos - getInfos() { - return this.infos; - } -} diff --git a/src/app/services/message.service.spec.ts b/src/app/services/message.service.spec.ts deleted file mode 100644 index 1db761b..0000000 --- a/src/app/services/message.service.spec.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { TestBed } from '@angular/core/testing'; - -import { MessageService } from './message.service'; - -describe('MessageService', () => { - let service: MessageService; - - beforeEach(() => { - TestBed.configureTestingModule({}); - service = TestBed.inject(MessageService); - }); - - it('should be created', () => { - expect(service).toBeTruthy(); - }); -}); diff --git a/src/app/services/message.service.ts b/src/app/services/message.service.ts deleted file mode 100644 index df2ffe6..0000000 --- a/src/app/services/message.service.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { Injectable } from '@angular/core'; - -@Injectable({ - providedIn: 'root' -}) -export class MessageService { - private messages: any[] = []; - - constructor() { } - - // Ajouter une info - addMessage(message: any) { - this.messages.push(message); - } - - // Récupérer toutes les infos - getMessage() { - return this.messages; - } -} diff --git a/src/styles.css b/src/styles.css deleted file mode 100644 index 473dcd0..0000000 --- a/src/styles.css +++ /dev/null @@ -1,30 +0,0 @@ -/* You can add global styles to this file, and also import other style files */ -.active-link { - color: #ffc107 !important; /* Jaune Bootstrap */ - font-weight: bold; - border-bottom: 2px solid #ffc107; -} - -.fs-40 { - padding-top: 2px !important; - padding-bottom: 2px !important; -} - -.fs-20 { - width: 5vw; -} - -.breakWord { - word-break: break-word; - word-wrap: break-word; -} - -.SpaceMargin-02 { - margin-left: 10px; - margin-top: 2px; -} - -.SpaceMargin-05 { - margin-left: 10px; - margin-top: 10px; -} \ No newline at end of file