Skip to content

Commit

Permalink
refactor(core): rm GOOGLE_MAPS_DIRECTIVES
Browse files Browse the repository at this point in the history
BREAKING CHANGE: previously deprecated GOOGLE_MAPS_DIRECTIVES
was removed. Please use AgmCoreModule instead.

Closes #608
  • Loading branch information
sebholstein committed Sep 1, 2016
1 parent 1995d4a commit 05544d5
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 16 deletions.
12 changes: 0 additions & 12 deletions src/core/directives-const.ts

This file was deleted.

1 change: 0 additions & 1 deletion src/core/directives.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
export {GOOGLE_MAPS_DIRECTIVES} from './directives-const';
export {SebmGoogleMap} from './directives/google-map';
export {SebmGoogleMapCircle} from './directives/google-map-circle';
export {SebmGoogleMapInfoWindow} from './directives/google-map-info-window';
Expand Down
15 changes: 12 additions & 3 deletions src/core/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import {ModuleWithProviders, NgModule, provide} from '@angular/core';

import {GOOGLE_MAPS_DIRECTIVES} from './directives-const';
import {SebmGoogleMap} from './directives/google-map';
import {SebmGoogleMapCircle} from './directives/google-map-circle';
import {SebmGoogleMapInfoWindow} from './directives/google-map-info-window';
import {SebmGoogleMapMarker} from './directives/google-map-marker';
import {SebmGoogleMapPolyline} from './directives/google-map-polyline';
import {SebmGoogleMapPolylinePoint} from './directives/google-map-polyline-point';
import {LazyMapsAPILoader} from './services/maps-api-loader/lazy-maps-api-loader';
import {MapsAPILoader} from './services/maps-api-loader/maps-api-loader';
import {BROWSER_GLOBALS_PROVIDERS} from './utils/browser-globals';
Expand All @@ -13,17 +18,21 @@ export * from './map-types';
// Google Maps types
export {LatLngBounds, LatLng, LatLngLiteral, MapTypeStyle} from './services/google-maps-types';

/** @deprecated */
const GOOGLE_MAPS_PROVIDERS: any[] = [
BROWSER_GLOBALS_PROVIDERS,
provide(MapsAPILoader, {useClass: LazyMapsAPILoader}),
];

const CORE_DIRECTIVES: any[] = [
SebmGoogleMap, SebmGoogleMapMarker, SebmGoogleMapInfoWindow, SebmGoogleMapCircle,
SebmGoogleMapPolyline, SebmGoogleMapPolylinePoint
];

/**
* The angular2-google-maps core module. Contains all Directives/Services/Pipes
* of the core module. Please use `AgmCoreModule.forRoot()` in your app module.
*/
@NgModule({declarations: GOOGLE_MAPS_DIRECTIVES, exports: GOOGLE_MAPS_DIRECTIVES})
@NgModule({declarations: CORE_DIRECTIVES, exports: CORE_DIRECTIVES})
export class AgmCoreModule {
static forRoot(): ModuleWithProviders {
return {
Expand Down

0 comments on commit 05544d5

Please sign in to comment.