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

Proper way of using with angular-cli #434

Open
bpatrik opened this issue Dec 8, 2018 · 0 comments
Open

Proper way of using with angular-cli #434

bpatrik opened this issue Dec 8, 2018 · 0 comments

Comments

@bpatrik
Copy link

bpatrik commented Dec 8, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants