dependencies Legend  Declarations  Module  Bootstrap  Providers  Exports cluster_LocationModule cluster_LocationModule_LocationPickerComponent_providers cluster_LocationModule_providers cluster_LocationModule_declarations cluster_LocationModule_exports cluster_LocationModule_imports LocationMapComponent LocationMapComponent LocationModule LocationModule LocationMapComponent->LocationModule LocationPickerComponent LocationPickerComponent LocationPickerComponent->LocationModule LocationSearchComponent LocationSearchComponent LocationSearchComponent->LocationModule LocationMapComponent LocationMapComponent LocationModule->LocationMapComponent LocationPickerComponent LocationPickerComponent LocationModule->LocationPickerComponent LocationSearchComponent LocationSearchComponent LocationModule->LocationSearchComponent {    provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => LocationPickerComponent), multi: true, } {    provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => LocationPickerComponent), multi: true, } {    provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => LocationPickerComponent), multi: true, }->LocationPickerComponent UiModule UiModule UiModule->LocationModule GeocodeService GeocodeService GeocodeService->LocationModule

File

packages/location/src/lib/location.module.ts

Description

This module holds all location/map related components and services

Methods

Static forRoot
forRoot(undefined)
Parameters :
Name Optional
No
import { AgmCoreModule } from '@agm/core';
import { CommonModule } from '@angular/common';
import { ModuleWithProviders, NgModule } from '@angular/core';
import { ReactiveFormsModule } from '@angular/forms';
import { UiModule } from '@ec.components/ui';
import { GeocodeService } from './geocode.service';
import { LocationMapComponent } from './location-map.component';
import { LocationPickerComponent } from './location-picker.component';
import { LocationSearchComponent } from './location-search.component';

/** This module holds all location/map related components and services */
@NgModule({
  imports: [
    CommonModule,
    ReactiveFormsModule,
    UiModule,
    AgmCoreModule.forRoot({
      apiKey: 'AIzaSyAdgEUE1Yxo1F-qb1MrO56u5KATpX9j8o4', // TODO: move to user land..
      libraries: ['places'],
    }),
  ],
  exports: [LocationMapComponent, LocationSearchComponent, LocationPickerComponent],
  declarations: [LocationMapComponent, LocationSearchComponent, LocationPickerComponent],
  providers: [GeocodeService],
})
export class LocationModule {
  static forRoot({ apiKey }): ModuleWithProviders<LocationModule> {
    return {
      ngModule: LocationModule,
      providers: [
        {
          provide: 'googlemaps.apiKey',
          useValue: apiKey,
        },
      ],
    };
  }
}

result-matching ""

    No results matching ""