Skip to content

Commit

Permalink
fix(providers): providers must be in public_api
Browse files Browse the repository at this point in the history
  • Loading branch information
mbarbeau committed Feb 22, 2019
1 parent 58a6431 commit 843061e
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 13 deletions.
5 changes: 2 additions & 3 deletions demo/src/app/geo/search/search.module.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
// import { HttpClientModule } from '@angular/common/http';

import {
MatCardModule,
Expand All @@ -25,7 +24,6 @@ import { AppSearchRoutingModule } from './search-routing.module';
declarations: [AppSearchComponent],
imports: [
CommonModule,
// HttpClientModule,
AppSearchRoutingModule,
MatCardModule,
MatButtonModule,
Expand All @@ -39,6 +37,7 @@ import { AppSearchRoutingModule } from './search-routing.module';
providers: [
provideIChercheSearchSource(),
provideILayerSearchSource(),
provideNominatimSearchSource()]
provideNominatimSearchSource()
]
})
export class AppSearchModule {}
3 changes: 1 addition & 2 deletions packages/geo/src/lib/datasource/shared/datasource.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Observable, BehaviorSubject } from 'rxjs';
import { map } from 'rxjs/operators';

import { CapabilitiesService } from './capabilities.service';

import { WFSService } from './datasources/wfs.service';
import {
DataSource,
OSMDataSource,
Expand All @@ -14,7 +14,6 @@ import {
XYZDataSourceOptions,
WFSDataSource,
WFSDataSourceOptions,
WFSService,
WMTSDataSource,
WMTSDataSourceOptions,
WMSDataSource,
Expand Down
6 changes: 2 additions & 4 deletions packages/geo/src/lib/search/search.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ import { NgModule, ModuleWithProviders } from '@angular/core';
import { CommonModule } from '@angular/common';

import { provideSearchSourceService } from './shared/search-source.service';
import {
provideDefaultIChercheSearchResultFormatter
} from './shared/sources/icherche.providers';
import { provideDefaultIChercheSearchResultFormatter } from './shared/sources/icherche.providers';

import { IgoSearchBarModule } from './search-bar/search-bar.module';
import { IgoSearchSelectorModule } from './search-selector/search-selector.module';
Expand All @@ -28,7 +26,7 @@ export class IgoSearchModule {
static forRoot(): ModuleWithProviders {
return {
ngModule: IgoSearchModule,
providers: [
providers: [
provideSearchSourceService(),
provideDefaultIChercheSearchResultFormatter()
]
Expand Down
8 changes: 4 additions & 4 deletions packages/geo/src/lib/search/shared/search-source.service.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import { SearchSource } from './sources';
import { SearchSource } from './sources/source';

/**
* Service where all available search sources are registered.
*/
export class SearchSourceService {

constructor(private sources: SearchSource[]) {}

/**
Expand All @@ -20,7 +19,9 @@ export class SearchSourceService {
* @returns Search sources
*/
getEnabledSources(): SearchSource[] {
return this.getSources().filter((source: SearchSource) => source.enabled === true);
return this.getSources().filter(
(source: SearchSource) => source.enabled === true
);
}

/**
Expand All @@ -38,7 +39,6 @@ export class SearchSourceService {
}
});
}

}

/**
Expand Down
3 changes: 3 additions & 0 deletions packages/geo/src/public_api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ export * from './lib/search/search-results/search-results.module';
export * from './lib/toast/toast.module';
export * from './lib/wkt/wkt.module';

export * from './lib/search/shared/sources/icherche.providers';
export * from './lib/search/shared/sources/ilayer.providers';
export * from './lib/search/shared/sources/nominatim.providers';
export * from './lib/routing/routing-sources/routing-source.provider';
export * from './lib/routing/shared/routing-source.service';

Expand Down

0 comments on commit 843061e

Please sign in to comment.