Ionic2 +Leaflet, leaflet plugins scrollTo include error


Hello, i’m new to Ionic 2 and Angular, and i’m trying to get leaflet slideTo plugin working ( )

After npm install I’ve included library like

import ‘leaflet’;
import ‘leaflet.marker.slideto/Leaflet.Marker.SlideTo.js’;

but when i try to use it like that:

vehicle.slideTo(position, {
duration: 200,
keepAtCenter: true

console says “Property ‘slideTo’ does not exist on type ‘Marker’.”

The funny part is that it works 1 out of 10 builds… And i can’t figure out what’s wrong

What can i do to make it work ?


all i did is i include "<script src=''></script>" after build/main.js


Mine solution was to add proper typings for markers