Skip to content

Commit 909e45a

Browse files
author
bcsik
committed
add routing
1 parent 3d1a6ed commit 909e45a

20 files changed

+166
-350
lines changed

src/app/app.component.html

Lines changed: 0 additions & 335 deletions
Large diffs are not rendered by default.

src/app/app.component.spec.ts

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,4 @@ describe('AppComponent', () => {
1313
const app = fixture.componentInstance;
1414
expect(app).toBeTruthy();
1515
});
16-
17-
it(`should have the 'bss-web-admin-frontend' title`, () => {
18-
const fixture = TestBed.createComponent(AppComponent);
19-
const app = fixture.componentInstance;
20-
expect(app.title).toEqual('bss-web-admin-frontend');
21-
});
22-
23-
it('should render title', () => {
24-
const fixture = TestBed.createComponent(AppComponent);
25-
fixture.detectChanges();
26-
const compiled = fixture.nativeElement as HTMLElement;
27-
expect(compiled.querySelector('h1')?.textContent).toContain('Hello, bss-web-admin-frontend');
28-
});
2916
});

src/app/app.component.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,4 @@ import { RouterOutlet } from '@angular/router';
99
styleUrl: './app.component.css'
1010
})
1111
export class AppComponent {
12-
title = 'bss-web-admin-frontend';
1312
}

src/app/app.routes.ts

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,24 @@
11
import { Routes } from '@angular/router';
22

3-
export const routes: Routes = [];
3+
export const routes: Routes = [
4+
{
5+
path: '',
6+
children: [
7+
{
8+
path: '',
9+
},
10+
{
11+
path: 'video',
12+
loadComponent: () => import('./features/video/video.component').then(c => c.VideoComponent)
13+
},
14+
{
15+
path: 'event',
16+
loadComponent: () => import('./features/event/event.component').then(c => c.EventComponent)
17+
},
18+
{
19+
path: 'member',
20+
loadComponent: () => import('./features/member/member.component').then(c => c.MemberComponent)
21+
}
22+
],
23+
}
24+
];

src/app/features/event/event.component.css

Whitespace-only changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<p>event works!</p>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import { ComponentFixture, TestBed } from '@angular/core/testing';
2+
3+
import { EventComponent } from './event.component';
4+
5+
describe('EventComponent', () => {
6+
let component: EventComponent;
7+
let fixture: ComponentFixture<EventComponent>;
8+
9+
beforeEach(async () => {
10+
await TestBed.configureTestingModule({
11+
imports: [EventComponent]
12+
})
13+
.compileComponents();
14+
15+
fixture = TestBed.createComponent(EventComponent);
16+
component = fixture.componentInstance;
17+
fixture.detectChanges();
18+
});
19+
20+
it('should create', () => {
21+
expect(component).toBeTruthy();
22+
});
23+
});
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { Component } from '@angular/core';
2+
3+
@Component({
4+
selector: 'app-event',
5+
standalone: true,
6+
imports: [],
7+
templateUrl: './event.component.html',
8+
styleUrl: './event.component.css'
9+
})
10+
export class EventComponent {
11+
12+
}

src/app/features/home/home.component.css

Whitespace-only changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<p>home works!</p>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import { ComponentFixture, TestBed } from '@angular/core/testing';
2+
3+
import { HomeComponent } from './home.component';
4+
5+
describe('HomeComponent', () => {
6+
let component: HomeComponent;
7+
let fixture: ComponentFixture<HomeComponent>;
8+
9+
beforeEach(async () => {
10+
await TestBed.configureTestingModule({
11+
imports: [HomeComponent]
12+
})
13+
.compileComponents();
14+
15+
fixture = TestBed.createComponent(HomeComponent);
16+
component = fixture.componentInstance;
17+
fixture.detectChanges();
18+
});
19+
20+
it('should create', () => {
21+
expect(component).toBeTruthy();
22+
});
23+
});
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { Component } from '@angular/core';
2+
3+
@Component({
4+
selector: 'app-home',
5+
standalone: true,
6+
imports: [],
7+
templateUrl: './home.component.html',
8+
styleUrl: './home.component.css'
9+
})
10+
export class HomeComponent {
11+
12+
}

src/app/features/member/member.component.css

Whitespace-only changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<p>member works!</p>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import { ComponentFixture, TestBed } from '@angular/core/testing';
2+
3+
import { MemberComponent } from './member.component';
4+
5+
describe('MemberComponent', () => {
6+
let component: MemberComponent;
7+
let fixture: ComponentFixture<MemberComponent>;
8+
9+
beforeEach(async () => {
10+
await TestBed.configureTestingModule({
11+
imports: [MemberComponent]
12+
})
13+
.compileComponents();
14+
15+
fixture = TestBed.createComponent(MemberComponent);
16+
component = fixture.componentInstance;
17+
fixture.detectChanges();
18+
});
19+
20+
it('should create', () => {
21+
expect(component).toBeTruthy();
22+
});
23+
});
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { Component } from '@angular/core';
2+
3+
@Component({
4+
selector: 'app-member',
5+
standalone: true,
6+
imports: [],
7+
templateUrl: './member.component.html',
8+
styleUrl: './member.component.css'
9+
})
10+
export class MemberComponent {
11+
12+
}

src/app/features/video/video.component.css

Whitespace-only changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<p>video works!</p>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import { ComponentFixture, TestBed } from '@angular/core/testing';
2+
3+
import { VideoComponent } from './video.component';
4+
5+
describe('VideoComponent', () => {
6+
let component: VideoComponent;
7+
let fixture: ComponentFixture<VideoComponent>;
8+
9+
beforeEach(async () => {
10+
await TestBed.configureTestingModule({
11+
imports: [VideoComponent]
12+
})
13+
.compileComponents();
14+
15+
fixture = TestBed.createComponent(VideoComponent);
16+
component = fixture.componentInstance;
17+
fixture.detectChanges();
18+
});
19+
20+
it('should create', () => {
21+
expect(component).toBeTruthy();
22+
});
23+
});
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { Component } from '@angular/core';
2+
3+
@Component({
4+
selector: 'app-video',
5+
standalone: true,
6+
imports: [],
7+
templateUrl: './video.component.html',
8+
styleUrl: './video.component.css'
9+
})
10+
export class VideoComponent {
11+
12+
}

0 commit comments

Comments
 (0)