leaflet-ng2
leaflet-ng2 copied to clipboard
Proper way of using with angular-cli
Hi,
I'm using your nice leaflet lib for my hobby project and I found it difficult to integrate it with angular-cli
.
I figured that leaflet-ng2 has a dependency on leaflet, so I do not need to include / npm install that source explicitly, but I found tricky to add the css
and marker images to the project.
Based on this, I've added the css
and images the following way:
"assets": [
{
"glob": "**/*",
"input": "./node_modules/leaflet/dist/images",
"output": "assets/leaflet"
},
...
],
"styles": [
"node_modules/leaflet/dist/leaflet.css",
...
]
but then I need to rewrite the default path for the markers for what I could not found any nice way.
I've ended up adding the css
from a cdn and not through the angular-cli, but It would be nice if I could use it with the cli.
Thank you for your help!
Best, Patrik