Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit cc9b7ac

Browse files
committed
Add features with angular 20
1 parent 6a41a64 commit cc9b7ac

File tree

5 files changed

+98
-27
lines changed

5 files changed

+98
-27
lines changed

‎frontend-angular/src/app/app.routes.ts

Lines changed: 18 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,32 @@
11
import { Routes } from '@angular/router';
22

33
import { Home } from './features/home/home';
4-
import { Login } from './features/login/login';
5-
import { Signup } from './features/signup/signup';
64
import { NotFound } from './features/not-found/not-found';
7-
import { About } from './features/about/about';
8-
import { Contact } from './features/contact/contact';
9-
10-
import { Experience } from './features/about/experience/experience';
11-
import { Skill } from './features/about/skill/skill';
12-
13-
import { Mailing } from './features/contact/mailing/mailing';
14-
import { Mapping } from './features/contact/mapping/mapping';
15-
import { Website } from './features/contact/website/website';
165

176
export const routes: Routes = [
187
{ path: '', component: Home, },
198

20-
{ path: 'login', component: Login },
21-
{ path: 'signup', component: Signup },
22-
239
{
24-
path: 'about', component: About,
25-
children: [
26-
{ path: '', component: Experience },
27-
{ path: 'experience', component: Experience },
28-
{ path: 'skill', component: Skill },
29-
],
10+
path: 'login',
11+
loadComponent: () => import(`./features/login/login`)
12+
.then(mod => mod.Login)
13+
},
14+
{
15+
path: 'signup',
16+
loadComponent: () => import(`./features/signup/signup`)
17+
.then(mod => mod.Signup)
18+
},
19+
20+
{
21+
path: 'contact',
22+
loadChildren: () => import(`./features/contact/contact.routes`)
23+
.then(routes => routes.routes)
3024
},
25+
3126
{
32-
path: 'contact', component: Contact,
33-
children: [
34-
{ path: '', component: Mailing },
35-
{ path: 'mailing', component: Mailing },
36-
{ path: 'mapping', component: Mapping },
37-
{ path: 'website', component: Website },
38-
],
27+
path: 'about',
28+
loadChildren: () => import('./features/about/about.routes')
29+
.then(routes => routes.routes)
3930
},
4031

4132
{ path: '**', component: NotFound }
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { ApplicationConfig } from '@angular/core';
2+
import { provideRouter } from '@angular/router';
3+
4+
import { routes } from './about.routes';
5+
6+
export const aboutConfig: ApplicationConfig = {
7+
providers: [provideRouter(routes)]
8+
};
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import { Routes } from '@angular/router';
2+
3+
import { About } from './about';
4+
5+
export const routes: Routes = [
6+
{
7+
path: '', component: About, children: [
8+
{
9+
path: '',
10+
loadComponent: () => import(`./experience/experience`)
11+
.then(mod => mod.Experience)
12+
},
13+
{
14+
path: 'experience',
15+
loadComponent: () => import(`./experience/experience`)
16+
.then(mod => mod.Experience)
17+
},
18+
{
19+
path: 'skill',
20+
loadComponent: () => import(`./skill/skill`)
21+
.then(mod => mod.Skill)
22+
},
23+
24+
{
25+
path: '**',
26+
loadComponent: () => import(`./experience/experience`)
27+
.then(mod => mod.Experience)
28+
},
29+
30+
]
31+
},
32+
];
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { ApplicationConfig } from '@angular/core';
2+
import { provideRouter } from '@angular/router';
3+
4+
import { routes } from './contact.routes';
5+
6+
export const contactConfig: ApplicationConfig = {
7+
providers: [provideRouter(routes)]
8+
};
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import { Routes } from '@angular/router';
2+
3+
import { Contact } from './contact';
4+
5+
export const routes: Routes = [
6+
{
7+
path: '', component: Contact, children: [
8+
{
9+
path: '',
10+
loadComponent: () => import(`./mailing/mailing`)
11+
.then(mod => mod.Mailing)
12+
},
13+
{
14+
path: 'mapping',
15+
loadComponent: () => import(`./mapping/mapping`)
16+
.then(mod => mod.Mapping)
17+
},
18+
{
19+
path: 'website',
20+
loadComponent: () => import(`./website/website`)
21+
.then(mod => mod.Website)
22+
},
23+
24+
{
25+
path: '**',
26+
loadComponent: () => import(`./mailing/mailing`)
27+
.then(mod => mod.Mailing)
28+
},
29+
30+
]
31+
},
32+
];

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /