File

src/components/location-overview/location-overview.module.ts

Description

This module configures the LocationOverviewComponent.

import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { LocationOverviewComponent } from './location-overview.component';
import { CmsConfig, ConfigModule } from '@spartacus/core';
import {
  LocationOverviewComponentConverter,
  LocationOverviewConverterToken,
} from '../../converter/location-overview/fs-location-overview-converter';
import { FsComponentConverter } from 'fs-spartacus-common';
import { PageComponentModule } from '@spartacus/storefront';

/**
 * This module configures the {@link LocationOverviewComponent}.
 *
 * @export
 * @class LocationOverviewModule
 */
@NgModule({
    declarations: [LocationOverviewComponent],
    imports: [
        CommonModule,
        PageComponentModule,
        ConfigModule.withConfig({
            cmsComponents: {
                location_overview: {
                    component: LocationOverviewComponent,
                },
            },
        } as CmsConfig),
    ],
    exports: [LocationOverviewComponent],
    providers: [
        {
            provide: LocationOverviewConverterToken,
            useClass: LocationOverviewComponentConverter,
            multi: true,
        },
        {
            provide: FsComponentConverter,
            useValue: { location_overview: LocationOverviewConverterToken },
            multi: true,
        },
    ]
})
export class LocationOverviewModule {}

results matching ""

    No results matching ""