File tree Expand file tree Collapse file tree 3 files changed +8
-1
lines changed
shared/cms/components/content-include Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -12,20 +12,24 @@ import { takeUntil } from 'rxjs/operators';
12
12
13
13
import { CMSFacade } from 'ish-core/facades/cms.facade' ;
14
14
import { ContentPageletEntryPointView } from 'ish-core/models/content-view/content-view.model' ;
15
+ import { GenerateLazyComponent } from 'ish-core/utils/module-loader/generate-lazy-component.decorator' ;
15
16
import { SfeMetadataWrapper } from 'ish-shared/cms/sfe-adapter/sfe-metadata-wrapper' ;
16
17
17
18
/**
18
19
* The Content Include Container Component renders the content of the include with the given 'includeId'.
19
- * For rendering is uses the {@link ContentPageletContainerComponent} for each sub pagelet.
20
+ * For rendering it uses the {@link ContentPageletContainerComponent} for each sub pagelet.
20
21
*
21
22
* @example
22
23
* <ish-content-include includeId="pwa.include.homepage.pagelet2-Include"></ish-content-include>
24
+ * or with lazy loading within the application shell
25
+ * <ish-lazy-content-include includeId="include.footer.pagelet2-Include"></ish-lazy-content-include>
23
26
*/
24
27
@Component ( {
25
28
selector : 'ish-content-include' ,
26
29
templateUrl : './content-include.component.html' ,
27
30
changeDetection : ChangeDetectionStrategy . OnPush ,
28
31
} )
32
+ @GenerateLazyComponent ( )
29
33
export class ContentIncludeComponent extends SfeMetadataWrapper implements OnInit , OnDestroy , OnChanges {
30
34
/**
31
35
* The ID of the Include whoes content is to be rendered.
Original file line number Diff line number Diff line change
1
+ /lazy **
Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ import { ProductImageComponent } from './header/product-image/product-image.comp
35
35
import { SearchBoxComponent } from './header/search-box/search-box.component' ;
36
36
import { SubCategoryNavigationComponent } from './header/sub-category-navigation/sub-category-navigation.component' ;
37
37
import { UserInformationMobileComponent } from './header/user-information-mobile/user-information-mobile.component' ;
38
+ import { LazyContentIncludeComponent } from './shared/lazy-content-include/lazy-content-include.component' ;
38
39
39
40
const importExportModules = [
40
41
CaptchaExportsModule ,
@@ -78,6 +79,7 @@ const exportedComponents = [
78
79
HeaderNavigationComponent ,
79
80
HeaderSimpleComponent ,
80
81
LanguageSwitchComponent ,
82
+ LazyContentIncludeComponent ,
81
83
LoginStatusComponent ,
82
84
MiniBasketComponent ,
83
85
ProductCompareStatusComponent ,
You can’t perform that action at this time.
0 commit comments