Install Leaflet in Angular 4

0

I am new at Angular, and I am not able to install the Leaflet library, with the same calls to the library that I use in HTML I do not work at angular, I wanted to know if someone knows how to install it. Thanks and regards.

    
asked by Gastón Graziani 05.01.2018 в 19:41
source

1 answer

0

You can install the package using:

 npm install leaflet --save

When the package is installed, you should be able to enter the path for the style and script files found in node_modules, going to angular-cli.json in the sections: "styles": [] and "scripts": []

  

Remember that Angular uses Angular-CLI - More information here

If you want to import the package into an existing module

At the top of your module write:

import L from 'leaflet';
    
answered by 05.01.2018 / 19:58
source