From: Kai Moritz Date: Sat, 6 Sep 2025 12:03:46 +0000 (+0200) Subject: introduced a home-component and added routing X-Git-Url: https://juplo.de/gitweb/?a=commitdiff_plain;h=7abb8966137b50f3fe2ba7dbeb2d7c0f4e3eabef;p=demos%2Fangular%2Fstored-login introduced a home-component and added routing --- diff --git a/src/app/app.component.html b/src/app/app.component.html index 36093e1..67e7bd4 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.routes.ts b/src/app/app.routes.ts index dc39edb..831f99a 100644 --- a/src/app/app.routes.ts +++ b/src/app/app.routes.ts @@ -1,3 +1,6 @@ import { Routes } from '@angular/router'; +import { HomeComponent } from './home/home.component'; -export const routes: Routes = []; +export const routes: Routes = [ + { path: '', component: HomeComponent }, // Default-Route +]; diff --git a/src/app/home/home.component.html b/src/app/home/home.component.html new file mode 100644 index 0000000..5f2c53f --- /dev/null +++ b/src/app/home/home.component.html @@ -0,0 +1 @@ +

home works!

diff --git a/src/app/home/home.component.less b/src/app/home/home.component.less new file mode 100644 index 0000000..e69de29 diff --git a/src/app/home/home.component.spec.ts b/src/app/home/home.component.spec.ts new file mode 100644 index 0000000..1191557 --- /dev/null +++ b/src/app/home/home.component.spec.ts @@ -0,0 +1,23 @@ +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({ + imports: [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 new file mode 100644 index 0000000..e9285d4 --- /dev/null +++ b/src/app/home/home.component.ts @@ -0,0 +1,11 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'app-home', + imports: [], + templateUrl: './home.component.html', + styleUrl: './home.component.less' +}) +export class HomeComponent { + +}