Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use the library in Angular 2+ apps? #101

Open
mickeyjohn opened this issue Nov 22, 2021 · 0 comments
Open

How to use the library in Angular 2+ apps? #101

mickeyjohn opened this issue Nov 22, 2021 · 0 comments

Comments

@mickeyjohn
Copy link

mickeyjohn commented Nov 22, 2021

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?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant