From ba2e989d4952dc56f38614468cefe68681e39c7d Mon Sep 17 00:00:00 2001 From: Jan Klattenhoff Date: Wed, 18 Dec 2024 09:11:59 +0100 Subject: [PATCH] feat(navigation): add navigation bar component and update app layout --- src/app/app.component.html | 337 +----------------- src/app/app.component.ts | 3 +- .../navigation-bar.component.css | 0 .../navigation-bar.component.html | 1 + .../navigation-bar.component.spec.ts | 23 ++ .../navigation-bar.component.ts | 12 + 6 files changed, 39 insertions(+), 337 deletions(-) create mode 100644 src/app/components/navigation-bar/navigation-bar.component.css create mode 100644 src/app/components/navigation-bar/navigation-bar.component.html create mode 100644 src/app/components/navigation-bar/navigation-bar.component.spec.ts create mode 100644 src/app/components/navigation-bar/navigation-bar.component.ts diff --git a/src/app/app.component.html b/src/app/app.component.html index 36093e1..60c0590 100644 --- a/src/app/app.component.html +++ b/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 }} - - - - - } -
- -
-
-
- - - - - - - - - - - + diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 04ea690..e7e6eed 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -1,10 +1,11 @@ import { Component } from '@angular/core'; import { RouterOutlet } from '@angular/router'; +import { NavigationBarComponent } from './components/navigation-bar/navigation-bar.component'; @Component({ selector: 'app-root', standalone: true, - imports: [RouterOutlet], + imports: [RouterOutlet, NavigationBarComponent], templateUrl: './app.component.html', styleUrl: './app.component.css' }) diff --git a/src/app/components/navigation-bar/navigation-bar.component.css b/src/app/components/navigation-bar/navigation-bar.component.css new file mode 100644 index 0000000..e69de29 diff --git a/src/app/components/navigation-bar/navigation-bar.component.html b/src/app/components/navigation-bar/navigation-bar.component.html new file mode 100644 index 0000000..8b82ab9 --- /dev/null +++ b/src/app/components/navigation-bar/navigation-bar.component.html @@ -0,0 +1 @@ +

navigation-bar works!

diff --git a/src/app/components/navigation-bar/navigation-bar.component.spec.ts b/src/app/components/navigation-bar/navigation-bar.component.spec.ts new file mode 100644 index 0000000..50ab2c0 --- /dev/null +++ b/src/app/components/navigation-bar/navigation-bar.component.spec.ts @@ -0,0 +1,23 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { NavigationBarComponent } from './navigation-bar.component'; + +describe('NavigationBarComponent', () => { + let component: NavigationBarComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + imports: [NavigationBarComponent] + }) + .compileComponents(); + + fixture = TestBed.createComponent(NavigationBarComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/components/navigation-bar/navigation-bar.component.ts b/src/app/components/navigation-bar/navigation-bar.component.ts new file mode 100644 index 0000000..ed53374 --- /dev/null +++ b/src/app/components/navigation-bar/navigation-bar.component.ts @@ -0,0 +1,12 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'app-navigation-bar', + standalone: true, + imports: [], + templateUrl: './navigation-bar.component.html', + styleUrl: './navigation-bar.component.css' +}) +export class NavigationBarComponent { + +}