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 {}
難道就沒有別的辦法,我能做到這一點?有沒有辦法將一個文件導入已經加載的模塊中?