Skip to content

Commit 1e1c165

Browse files
authoredAug 28, 2022
feat(cli): add dynamic start page (#1524)
1 parent 255e023 commit 1e1c165

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed
 

‎schematics/application/files/src/app/core/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
export * from './module-import-guard';
33
export * from './net/default.interceptor';
44
export * from './startup/startup.service';
5+
export * from './start-page.guard';

‎schematics/application/files/src/app/routes/routes-routing.module.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { NgModule } from '@angular/core';
22
import { RouterModule, Routes } from '@angular/router';
3+
import { startPageGuard } from '@core';
34
import { SimpleGuard } from '@delon/auth';
45
import { environment } from '@env/environment';
56
// layout
@@ -19,7 +20,7 @@ const routes: Routes = [
1920
{
2021
path: '',
2122
component: LayoutBasicComponent,
22-
canActivate: [SimpleGuard],
23+
canActivate: [startPageGuard, SimpleGuard],
2324
children: [
2425
{ path: '', redirectTo: 'dashboard', pathMatch: 'full' },
2526
{ path: 'dashboard', component: DashboardComponent, data: { title: '仪表盘'<% if (!i18n) { %>, titleI18n: 'dashboard'<% } %> } },

‎scripts/ci/build-schematics.sh

+1
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ copyFiles() {
9797
# core
9898
"${1}src/app/core/i18n|${2}application/files/src/app/core/"
9999
"${1}src/app/core/net|${2}application/files/src/app/core/"
100+
"${1}src/app/core/start-page.guard.ts|${2}application/files/src/app/core/"
100101
"${1}src/app/core/module-import-guard.ts|${2}application/files/src/app/core/"
101102
"${1}src/app/core/README.md|${2}application/files/src/app/core/"
102103
# shared

0 commit comments

Comments
 (0)
Please sign in to comment.