projects/maplander/components/src/lib/components/property-card/property-card.module.ts
Static forChild | ||||||
forChild(isOPI?: boolean)
|
||||||
Parameters :
Returns :
ModuleWithProviders
|
import { ModuleWithProviders, NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
import {PropertyCardComponent} from './property-card.component';
import {RouterModule} from '@angular/router';
import {AddressFormatModule} from './../../pipes/address/address-format.module';
import {OfferingTypeModule} from './../../pipes/offering-type/offering-type.module';
import {PropertyTypeModule} from './../../pipes/property-type/property-type.module';
import {ImageErrorModule} from './../../directives/image-error/image-error.module';
import {MatButtonModule} from '@angular/material/button';
import {MatIconModule} from '@angular/material/icon';
import {PROPERTY_CARD_CONFIG_MODULE} from './token';
@NgModule({
imports: [
CommonModule,
RouterModule,
AddressFormatModule,
PropertyTypeModule,
OfferingTypeModule,
ImageErrorModule,
MatIconModule,
MatButtonModule
],
declarations: [
PropertyCardComponent
],
exports: [
PropertyCardComponent
]
})
export class PropertyCardModule {
static forChild(isOPI?: boolean): ModuleWithProviders {
return {
ngModule: PropertyCardModule,
providers: [
{
provide: PROPERTY_CARD_CONFIG_MODULE,
useValue: isOPI
}
]
};
}
}