Skip to content
This repository was archived by the owner on Jun 23, 2025. It is now read-only.

Commit 8efa96d

Browse files
committed
feat(*): rename ANGULAR2_GOOGLE_MAPS_* constants
This removes the ANGULAR2_ prefix. BREAKING CHANGES `ANGULAR2_GOOGLE_MAPS_PROVIDERS` is now called `GOOGLE_MAPS_PROVIDERS`. `ANGULAR2_GOOGLE_MAPS_DIRECTIVES`is now called `GOOGLE_MAPS_DIRECTIVES`. Please update existing import of these two constants in your code. Related to #395 Closes #406
1 parent c688b27 commit 8efa96d

5 files changed

Lines changed: 12 additions & 12 deletions

File tree

docs/_partials/homepage/quickstart-example.ejs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ import {Component} from '@angular/core';
22
import {bootstrap} from '@angular/platform-browser-dynamic';
33

44
import {
5-
ANGULAR2_GOOGLE_MAPS_DIRECTIVES,
6-
ANGULAR2_GOOGLE_MAPS_PROVIDERS
5+
GOOGLE_MAPS_DIRECTIVES,
6+
GOOGLE_MAPS_PROVIDERS
77
} from 'angular2-google-maps/core';
88

99
@Component({
1010
selector: 'app-component',
11-
directives: [ANGULAR2_GOOGLE_MAPS_DIRECTIVES]
11+
directives: [GOOGLE_MAPS_DIRECTIVES]
1212
template: `
1313
<sebm-google-map [latitude]="lat" [longitude]="lng">
1414
</sebm-google-map>
@@ -19,4 +19,4 @@ class AppComponent {
1919
lng: number = 33.2;
2020
}
2121

22-
bootstrap(AppComponent, [ANGULAR2_GOOGLE_MAPS_PROVIDERS]);
22+
bootstrap(AppComponent, [GOOGLE_MAPS_PROVIDERS]);

docs/getting-started.jade

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -344,11 +344,11 @@ a.button.button-icon.blue-light(href='http://plnkr.co/edit/YX7W20?p=preview') &r
344344
:marked
345345
```typescript
346346
import {Component} from '@angular/core';
347-
import {ANGULAR2_GOOGLE_MAPS_DIRECTIVES} from 'angular2-google-maps/core';
347+
import {GOOGLE_MAPS_DIRECTIVES} from 'angular2-google-maps/core';
348348

349349
@Component({
350350
selector: 'my-app',
351-
directives: [ANGULAR2_GOOGLE_MAPS_DIRECTIVES], // this loads all angular2-google-maps directives in this component
351+
directives: [GOOGLE_MAPS_DIRECTIVES], // this loads all angular2-google-maps directives in this component
352352
// the following line sets the height of the map - Important: if you don't set a height, you won't see a map!!
353353
styles: [`
354354
.sebm-google-map-container {
@@ -385,11 +385,11 @@ a.button.button-icon.blue-light(href='http://plnkr.co/edit/YX7W20?p=preview') &r
385385
```typescript
386386
import {bootstrap} from '@angular/platform-browser-dynamic';
387387
import {AppComponent} from './app.component';
388-
import {ANGULAR2_GOOGLE_MAPS_PROVIDERS} from 'angular2-google-maps/core';
388+
import {GOOGLE_MAPS_PROVIDERS} from 'angular2-google-maps/core';
389389

390390
// this line boots our application on the page in the <my-app> element:
391-
// Note: It is required to add the ANGULAR2_GOOGLE_MAPS_PROVIDERS here!
392-
bootstrap(AppComponent, [ANGULAR2_GOOGLE_MAPS_PROVIDERS]);
391+
// Note: It is required to add the GOOGLE_MAPS_PROVIDERS here!
392+
bootstrap(AppComponent, [GOOGLE_MAPS_PROVIDERS]);
393393
```
394394
### Final project structure
395395
Our final project structure should look like this:

src/core/directives-const.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ import {SebmGoogleMap} from './directives/google-map';
22
import {SebmGoogleMapInfoWindow} from './directives/google-map-info-window';
33
import {SebmGoogleMapMarker} from './directives/google-map-marker';
44

5-
export const ANGULAR2_GOOGLE_MAPS_DIRECTIVES: any[] =
5+
export const GOOGLE_MAPS_DIRECTIVES: any[] =
66
[SebmGoogleMap, SebmGoogleMapMarker, SebmGoogleMapInfoWindow];

src/core/directives.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export {ANGULAR2_GOOGLE_MAPS_DIRECTIVES} from './directives-const';
1+
export {GOOGLE_MAPS_DIRECTIVES} from './directives-const';
22
export {SebmGoogleMap} from './directives/google-map';
33
export {SebmGoogleMapInfoWindow} from './directives/google-map-info-window';
44
export {SebmGoogleMapMarker} from './directives/google-map-marker';

src/core/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ export * from './directives';
88
export * from './services';
99
export * from './events';
1010

11-
export const ANGULAR2_GOOGLE_MAPS_PROVIDERS: any[] = [
11+
export const GOOGLE_MAPS_PROVIDERS: any[] = [
1212
new Provider(MapsAPILoader, {useClass: LazyMapsAPILoader}),
1313
];

0 commit comments

Comments
 (0)