feat(challengestandalone): challenge standalone

This commit is contained in:
ThomasL
2023-06-19 18:06:50 +02:00
parent bcf44956f9
commit 8f6716979e
165 changed files with 2794 additions and 22 deletions

View File

@@ -0,0 +1,11 @@
import { provideToken } from '@angular-challenges/module-to-standalone/core/providers';
import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import { appRoutes } from './main-shell.routes';
@NgModule({
imports: [RouterModule.forRoot(appRoutes)],
exports: [RouterModule],
providers: [provideToken('main-shell-token')],
})
export class MainShellModule {}

View File

@@ -0,0 +1,34 @@
import { Route } from '@angular/router';
export const appRoutes: Route[] = [
{ path: '', redirectTo: 'home', pathMatch: 'full' },
{
path: 'home',
loadChildren: () =>
import('@angular-challenges/module-to-standalone/home').then(
(m) => m.ModuleToStandaloneHomeModule
),
},
{
path: 'admin',
loadChildren: () =>
import('@angular-challenges/module-to-standalone/admin/feature').then(
(m) => m.AdminFeatureModule
),
},
{
path: 'user',
loadChildren: () =>
import('@angular-challenges/module-to-standalone/user/shell').then(
(m) => m.UserShellModule
),
},
{
path: 'forbidden',
loadChildren: () =>
import('@angular-challenges/module-to-standalone/forbidden').then(
(m) => m.ForbiddenModule
),
},
];