geodesy icon indicating copy to clipboard operation
geodesy copied to clipboard

How to use the library in Angular 2+ apps?

Open mickeyjohn opened this issue 3 years ago • 0 comments

Hi, I am using Angular 9+ with angular cli. After installed the types and geodesy I could not import and and use the library classes. For example: import { LatLon as LL} from 'geodesy/latlon-spherical'; Or import { LatLon as LL} from 'geodesy/latlon-spherical.js';

Compile error: error TS2614: Module '"../../../../node_modules/@types/geodesy/latlon-spherical"' has no exported member 'LatLon'. Did you mean to use 'import LatLon from "../../../../node_modules/@types/geodesy/latlon-spherical"' instead?

My questions are:

  1. Has anyone used the version 2 in Angular apps normally?
  2. Does it require to use Babeljs to transpile to es5 modules to use in angular cli apps?

mickeyjohn avatar Nov 22 '21 21:11 mickeyjohn