采用了棱角分明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配置?