採用了棱角分明2.4.0,2.3.1 TSC,我試圖用Dagre與JointJS/graphlib使用SystemJS作爲裝載機Angular2繪製圖表。Dagre Angular2 SystemJS模塊加載
http://www.daviddurman.com/automatic-graph-layout-with-jointjs-and-dagre.html
我無法弄清楚如何將所要求的JointJS var dagre = require('dagre');
我Angular2組件獲得在瀏覽器中的 'dagre' 對象包括 import * as dagre from 'dagre';
我SystemJS配置:
(function() {
System.config({
map: {
'dagre': '/static/libs/dagre/dagre.js'
}
});
})();
不是能夠當它試圖調用dagre.layout到dagre導致加載到JointJS一個未定義的錯誤: Cannot read property 'layout' of undefined
// Executes the layout.
dagre.layout(glGraph, { debugTiming: !!opt.debugTiming });
也許這是與庫不輸出本身還是必須在指定的格式問題我的SystemJS配置?