-
Notifications
You must be signed in to change notification settings - Fork 103
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
leaflet-FreeDraw for angular 4 #123
Comments
For the |
@Wildhoney thank you for the answer, you mean that I should include babel-polyfill in my packages ? |
Yep, and then if you're using Webpack you can do something like: module.exports = {
entry: ["babel-polyfill", "./app.js"]
}; |
@Wildhoney thank you for your help, in fact I did it as you said, the library is apparently well imported. Still, I get a weired error:
|
Hello I'm using the following module in angular 4:
https://github.com/Wildhoney/Leaflet.FreeDraw
in the following way:
import { FreeDraw } from 'leaflet-freedraw';
The project is compiling, which means that there is no problem of typings.
However, I'm getting the following error in the console:
Uncaught ReferenceError: regeneratorRuntime is not defined
I tried another solution, which is to import the project directly as JS, and write the typings as follow:
import 'leaflet-freedraw/dist/leaflet-freedraw.web.js';
import { FreeDraw } from '../xxx/freeDraw-typings';
with freeDaw-typings containing the following:
export class FreeDraw {
constructor(params?: any);
on(params: any):any;
mode(params: any):any;
create(params: any):any;
}
but I get the following:
Module not found: Error: Can't resolve '../xxx/freeDraw-typings'
The text was updated successfully, but these errors were encountered: