Merge pull request 'refactor: remove server configuration and routes for admin module; simplify routing structure' (#2) from task/popup-for-dynamic-form into develop
Reviewed-on: #2
This commit is contained in:
commit
b30fc0235d
@ -1,12 +0,0 @@
|
|||||||
import { mergeApplicationConfig, ApplicationConfig } from '@angular/core';
|
|
||||||
import { provideServerRendering, withRoutes } from '@angular/ssr';
|
|
||||||
import { appConfig } from './app.config';
|
|
||||||
import { serverRoutes } from './app.routes.server';
|
|
||||||
|
|
||||||
const serverConfig: ApplicationConfig = {
|
|
||||||
providers: [
|
|
||||||
provideServerRendering(withRoutes(serverRoutes))
|
|
||||||
]
|
|
||||||
};
|
|
||||||
|
|
||||||
export const config = mergeApplicationConfig(appConfig, serverConfig);
|
|
||||||
@ -1,12 +0,0 @@
|
|||||||
import { RenderMode, ServerRoute } from '@angular/ssr';
|
|
||||||
|
|
||||||
export const serverRoutes: ServerRoute[] = [
|
|
||||||
{
|
|
||||||
path: 'admin/login',
|
|
||||||
renderMode: RenderMode.Prerender
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '**',
|
|
||||||
renderMode: RenderMode.Client
|
|
||||||
}
|
|
||||||
];
|
|
||||||
@ -16,16 +16,11 @@ const enum AdminRouteTitles {
|
|||||||
export const routes: Routes = [
|
export const routes: Routes = [
|
||||||
{
|
{
|
||||||
path: '',
|
path: '',
|
||||||
redirectTo: 'admin/about',
|
redirectTo: 'about',
|
||||||
pathMatch: 'full'
|
pathMatch: 'full'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'admin',
|
path: '',
|
||||||
redirectTo: 'admin/about',
|
|
||||||
pathMatch: 'full'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: 'admin',
|
|
||||||
component: AdminLayout,
|
component: AdminLayout,
|
||||||
title: 'Admin',
|
title: 'Admin',
|
||||||
children: [
|
children: [
|
||||||
|
|||||||
@ -1,8 +0,0 @@
|
|||||||
import { BootstrapContext, bootstrapApplication } from '@angular/platform-browser';
|
|
||||||
import { App } from './app/app';
|
|
||||||
import { config } from './app/app.config.server';
|
|
||||||
|
|
||||||
const bootstrap = (context: BootstrapContext) =>
|
|
||||||
bootstrapApplication(App, config, context);
|
|
||||||
|
|
||||||
export default bootstrap;
|
|
||||||
Loading…
Reference in New Issue
Block a user