- add marker service

- enable dependency injection with webpack configuration
This commit is contained in:
Arno Kaimbacher 2021-08-03 16:59:39 +02:00
commit 5f2dd2851b
16 changed files with 4606 additions and 1165 deletions

View file

@ -4,12 +4,40 @@ import { BrowserModule } from "@angular/platform-browser";
import { AppComponent } from './app.component';
import { MapComponent } from './map/map.component';
import { HttpClientModule } from '@angular/common/http'; //for http requests
// import { TranslateLoader, TranslateModule } from '@ngx-translate/core';
// import { TranslateHttpLoader } from '@ngx-translate/http-loader';
import { MarkerService } from './marker.service';
// siehe https://52north.github.io/helgoland-toolbox/additional-documentation/how-tos/integrate-a-map-component.html
// https://52north.github.io/helgoland-toolbox/components/LocateControlComponent.html#source
// import { HelgolandMapControlModule, HelgolandMapSelectorModule } from '@helgoland/map';
// import { HelgolandSelectorModule } from '@helgoland/selector';
// import { HelgolandDatasetlistModule } from '@helgoland/depiction';
// import { DatasetApiInterface, SplittedDataDatasetApiInterface } from '@helgoland/core';
// import 'core-js';
@NgModule({
// declarations: The components, directives, and pipes that belong to this NgModule.
declarations: [AppComponent, MapComponent],
// imports: Other modules whose exported classes are needed by component templates declared in this NgModule.
imports: [BrowserModule],
providers: [],
imports: [BrowserModule, HttpClientModule],
// TranslateModule.forRoot({
// loader: {
// provide: TranslateLoader,
// useFactory: HttpLoaderFactory,
// deps: [HttpClient]
// }
// }),
// HelgolandSelectorModule, HelgolandMapControlModule, HelgolandMapSelectorModule, HelgolandDatasetlistModule],
providers: [
MarkerService,
// {
// provide: DatasetApiInterface,
// useClass: SplittedDataDatasetApiInterface
// }
],
// bootstrap: The main application view, called the root component, which hosts all other application views.
// Only the root NgModule should set the bootstrap property.
bootstrap: [AppComponent],
@ -17,5 +45,9 @@ import { MapComponent } from './map/map.component';
export class AppModule {
constructor() {}
}
// export function HttpLoaderFactory(http: HttpClient) {
// return new TranslateHttpLoader(http);
// }
// https://medium.com/@hubert.zub/using-babel-7-and-preset-typescript-to-compile-angular-6-app-448eb1880f2c