src/components/multi-slot-container/msc-items/msc-content-item/msc-content-item.module.ts
This module configures the MSCContentItemComponent.
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import { CmsConfig, ConfigModule, UrlModule } from '@spartacus/core';
import { FsComponentConverter } from 'fs-spartacus-common';
import {
MSCContentItemConverterToken,
MSCContentItemtConverter,
} from '../../../../converter/multi-slot-container-converter/msc-content-item-converter';
import { MSCContentItemComponent } from './msc-content-item.component';
/**
* This module configures the {@link MSCContentItemComponent}.
*
* @export
* @class MSCContentItemModule
*/
@NgModule({
declarations: [MSCContentItemComponent],
imports: [
CommonModule,
RouterModule,
UrlModule,
ConfigModule.withConfig({
cmsComponents: {
msc_content_item: { component: MSCContentItemComponent },
},
} as CmsConfig),
],
exports: [MSCContentItemComponent],
providers: [
{
provide: MSCContentItemConverterToken,
useClass: MSCContentItemtConverter,
multi: true,
},
{
provide: FsComponentConverter,
useValue: { msc_content_item: MSCContentItemConverterToken },
multi: true,
},
]
})
export class MSCContentItemModule {}