Skip to content

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

Open
@mickeyjohn

Description

@mickeyjohn

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions