2
一个简单的路障。我需要在我的一些服务中使用Leaflet和Leaflet-Draw插件。如何导入在同一名称空间上扩展另一个模块
我不知道如何导入整个模块(内核和插件)
// the core
import * as L from 'leaflet';
// extension
import 'leaflet-draw';
export class LeafletConsumerService {}
我有我不喜欢太多的解决方案。我加载通过硬连接他们的图书馆index.html
和消费者只是具有参考声明的分型文件
/// <reference path="../typings/index.d.ts" />
export class LeafletConsumerService {}
难道就没有别的办法,我能做到这一点?有没有办法将一个文件导入已经加载的模块中?