@placeme/ngx-geo-api-gouv-address
Version:
[](https://travis-ci.com/PlaceMe-SAS/ngx-geo-api-gouv)
63 lines (57 loc) • 2.83 kB
JavaScript
import * as i0 from '@angular/core';
import { Injectable, NgModule, Optional, SkipSelf } from '@angular/core';
import * as i1 from '@angular/common/http';
const API_ENDPOINT = 'https://data.geopf.fr/geocodage';
class GeoApiGouvAddressService {
constructor(httpClient) {
this.httpClient = httpClient;
}
query(params) {
return this.httpClient.get(`${API_ENDPOINT}/search/`, { params: params });
}
reverse(params) {
return this.httpClient.get(`${API_ENDPOINT}/reverse/`, { params: params });
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: GeoApiGouvAddressService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable }); }
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: GeoApiGouvAddressService }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: GeoApiGouvAddressService, decorators: [{
type: Injectable
}], ctorParameters: () => [{ type: i1.HttpClient }] });
class GeoApiGouvAddressModule {
constructor(parentModule) {
if (parentModule) {
throw new Error('GeoApiGouvAddressModule is already loaded. Import it in the AppModule only');
}
}
static forRoot() {
return {
ngModule: GeoApiGouvAddressModule,
providers: [GeoApiGouvAddressService],
};
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: GeoApiGouvAddressModule, deps: [{ token: GeoApiGouvAddressModule, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.NgModule }); }
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.1.2", ngImport: i0, type: GeoApiGouvAddressModule }); }
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: GeoApiGouvAddressModule }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: GeoApiGouvAddressModule, decorators: [{
type: NgModule,
args: [{
declarations: [],
imports: [],
exports: [],
providers: [],
}]
}], ctorParameters: () => [{ type: GeoApiGouvAddressModule, decorators: [{
type: Optional
}, {
type: SkipSelf
}] }] });
/*
* Public API Surface of ngx-geo-api-gouv-address
*/
/**
* Generated bundle index. Do not edit.
*/
export { GeoApiGouvAddressModule, GeoApiGouvAddressService };
//# sourceMappingURL=placeme-ngx-geo-api-gouv-address.mjs.map