projects/maplander/components/src/lib/components/filters/filters.module.ts
Static forChild | ||||||
forChild(isOPI?: boolean)
|
||||||
Parameters :
Returns :
ModuleWithProviders
|
import {ModuleWithProviders, NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
import {FiltersComponent} from './filters.component';
import {MatButtonToggleModule} from '@angular/material/button-toggle';
import {MatIconModule} from '@angular/material/icon';
import {MatButtonModule} from '@angular/material/button';
import {MatFormFieldModule} from '@angular/material/form-field';
import {MatSelectModule} from '@angular/material/select';
import {MatDividerModule} from '@angular/material/divider';
import {MarkerPriceModule} from './../../pipes/marker-price/marker-price.module';
import {CurrencyConverterModule} from './../../services/currency-converter/currency-converter.module';
import {FiltersService} from './filters.service';
import {FILTERS_TOKEN} from './token';
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
import {MatRippleModule} from '@angular/material/core';
@NgModule({
imports: [
CommonModule,
ReactiveFormsModule,
FormsModule,
MatRippleModule,
MatFormFieldModule,
MatSelectModule,
MatButtonToggleModule,
MatIconModule,
MatButtonModule,
MatDividerModule,
MarkerPriceModule.forChild(),
CurrencyConverterModule.forChild()
],
declarations: [
FiltersComponent
],
exports: [
FiltersComponent
],
providers: [
FiltersService
]
})
export class FiltersModule {
static forChild(isOPI?: boolean): ModuleWithProviders {
return {
ngModule: FiltersModule,
providers: [
FiltersService,
{
provide: FILTERS_TOKEN,
useValue: isOPI || false
}
]
};
}
}