Skip to content

Commit fe9cc3a

Browse files
committed
fix resource details
1 parent 52068be commit fe9cc3a

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

src/app/app.config.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import { modalNoticeReducer } from './shared/store/modal-notice-state/modal-noti
2121
import { MarkdownModule, provideMarkdown } from 'ngx-markdown';
2222
import { provideLottieOptions } from 'ngx-lottie';
2323
import { variableReducer } from './shared/store/variable-state/variable.reducer';
24-
import { CustomPreloadStrategy } from './core/strategies/custom-preload.strategy';
2524

2625
export const appConfig: ApplicationConfig = {
2726
providers: [
@@ -40,7 +39,7 @@ export const appConfig: ApplicationConfig = {
4039
}),
4140
provideAnimations(),
4241
provideMarkdown(),
43-
provideRouter(routes, withPreloading(CustomPreloadStrategy)),
42+
provideRouter(routes, withPreloading(PreloadAllModules)),
4443
importProvidersFrom(MarkdownModule.forRoot()),
4544
],
4645
};

src/app/app.routes.ts

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import { AppLayoutComponent } from './layouts/layout-pages/app-layout/app-layout
66
import { AdminLayoutComponent } from './layouts/layout-pages/admin-layout/admin-layout';
77
// import { RoleGuard } from './core/guards/router-protected/role.guard';
88
import { PostModule } from './features/post/post.module';
9-
import { LandingModule } from './features/landing/landing.module';
109

1110
export const routes: Routes = [
1211
//Để test
@@ -77,14 +76,15 @@ export const routes: Routes = [
7776
{
7877
path: 'auth',
7978
component: AuthLayoutComponent,
80-
data: { skipBreadcrumb: true, preload: true },
79+
data: { skipBreadcrumb: true },
8180
children: [
8281
{
8382
path: 'identity',
8483
loadChildren: () =>
8584
import('./features/auth/auth.module').then((m) => m.AuthModule),
8685
},
8786
],
87+
// data: { preload: true },
8888
},
8989

9090
//Load app chính
@@ -94,10 +94,10 @@ export const routes: Routes = [
9494
children: [
9595
{
9696
path: '',
97-
loadChildren: () => LandingModule,
98-
// import('./features/landing/landing.module').then(
99-
// (m) => m.LandingModule
100-
// ),
97+
loadChildren: () =>
98+
import('./features/landing/landing.module').then(
99+
(m) => m.LandingModule
100+
),
101101
title: 'CodeCampus',
102102
},
103103
{
@@ -155,7 +155,6 @@ export const routes: Routes = [
155155
),
156156
},
157157
],
158-
data: { preload: true },
159158
},
160159

161160
{
@@ -203,7 +202,6 @@ export const routes: Routes = [
203202
data: { breadcrumb: 'Quản lý tài nguyên' },
204203
},
205204
],
206-
data: { preload: false },
207205
},
208206

209207
{

src/app/features/resource-learning/pages/resource-detail/resource-detail.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,10 @@ export class ResourceDetail implements OnInit {
179179
])
180180
.pipe(
181181
map(([videosRes, docsRes]) => {
182-
const videos = videosRes.result ?? [];
182+
const videos =
183+
videosRes.result.filter(
184+
(data) => data.checksum !== 'check-sum-demo'
185+
) ?? [];
183186
const docs = docsRes.result ?? [];
184187
return [...videos, ...docs]; // gộp
185188
})

0 commit comments

Comments
 (0)